Modify object detection example

Codecov Report

Merging #138 into master will increase coverage by 0.13%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
+ Coverage   57.03%   57.17%   +0.13%
==========================================
  Files          12       12
  Lines        1243     1240       -3
==========================================
  Hits          709      709
+ Misses        534      531       -3

Impacted Files
Coverage Δ

src/ml/utils.py
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e34ebcf...ef29d6b. Read the comment docs.


Update Pages “resume”

Automatically generated by Netlify CMS

👷 Deploy Preview for koytak processing.

Name
Link

🔨 Latest commit
4912a08e84e476fe87847aed969dc22d44c487da

🔍 Latest deploy log
https://app.netlify.com/sites/koytak/deploys/66a11645ee9ebe0008afd7c7


Cannot undo deleting a config file

(Pressing CTRL + Z)

Parenting them to nil instead of destroying them when deleting them should resolve this. Or just move over to using attributes rather than string values.

Not sure if it's even intended that you can press CTRL + Z to attempt to undo the deletion.


how to set proxy auth ?

my proxy server has authentication
(async() => {
    const browser = await puppeteer.launch({
    args: [  '--proxy-server='+proxyServer+'','--no-sandbox', '--disable-setuid-sandbox' ]
});
const page = await browser.newPage();
await page.goto('https://www.google.com/');
await page.screenshot({path: 'full.png', fullPage: true});
browser.close();

+1

+1

+1

Dupe of #426

can you put it into example folder ? i add proxy-Auth.... header ， not work , many people care about this question  @aslushnikov

+1

Definitely +1.
Currently using a local CNTLM installation to avoid auth.

@androidfanatic @WG-Com @tmpace page.authenticate has landed in current alpha.

Not sure, page.authenticate is not working for me, and I used page.setExtraHTTPHeaders to workaround:
await page.setExtraHTTPHeaders({
    'Proxy-Authorization': 'Basic ' + Buffer.from('user:pass').toString('base64'),
});

@adarmanto  I added ignoreHTTPSErrors in args ,but also not work.

@aslushnikov
const browser = await puppeteer.launch({
ignoreHTTPSErrors: true,
args: ['--proxy-server=example.com:8080']
});
const page = await browser.newPage();
//await page.authenticate({'username':username,'password':password});
await page.setExtraHTTPHeaders({
'Proxy-Authorization': 'Basic ' + Buffer.from('user:pass').toString('base64'),
});
This will only work for HTTP websites, but not HTTPS. What should I do？thanks

This actually works like a charm to me.
const browser = await puppeteer.launch({
args: [
'--proxy-server=YOUR-PROXY-SERVER:PORT'
],
});
After Pupperteer Launch use following parameters to authenticate.
await page.authenticate({
username: 'USER-NAME',
password: 'PASSWORD',
});


Downgrade node guide test to v16 for heroku-18 stack

The node-js-getting started guide should be compatible with both Node 16.x and 18.x but the Heroku-18 stack only supports Node 16.x.  This change adds an conditional step to the test workflow to downgrade the engine specified in package.json from 18.x || 16.x to just 16.x.
See:
https://github.com/heroku/node-js-getting-started/pull/294#discussion_r1127817002
GUS-W-12652981.

Only ~7 weeks until Heroku-18 EOL 🎉


Add base64 encode/decode template helpers

Add two new template helper functions, base64Encode and base64Decode, to enable base64 handling of template data.

LGTM

Great, let me know if there's anything else you need from my end.

Nothing from your end, just need reviews from Kelsey for any new features. :)

Ok, thanks.

I've gone ahead and made a v0.12.1 release on my fork that includes this change. See the v0.12.0 and v0.12.1 release notes.


Add option to ignore case when searching for the username property

This may not work for other implementations of GORM other than Hibernate. We would need to verify that.

IgnoreCase does not work with mongo - eq() does not have the 3rd parameter in MongoCriteriaBuilder. I don't see a way to do this currently outside of hibernate correctly (I'm no mongodb expert though). If mongo has a way to do this we could potentially add that into GORM so it matches the interface eq(prop, val, options)
ilike/=~ won't work because % is a valid character for an email address (so<EMAIL_ADDRESS>will match multiple, causing subtle issues.
Also as discussed on slack the other day User.findWhere([email<EMAIL_ADDRESS>[ignoreCase: true]) wont work since it ignores the second map in both hibernate and mongo (and probably suffers the same missing implementation)
IgnoreCase value is false by default it won't change anything for current users. I think having it simpler for a majority of users by not creating a custom UserDetailsService is a good thing. We could call out it only works for hibernate datastores. Also the GORM docs don't mention that ignoreCase only works with hibernate - http://docs.grails.org/3.2.0/ref/Domain Classes/createCriteria.html
I'll patch this PR to call the right constructor when ignoreCase is false.

Looks good, thanks for the PR.

I believe we need to have something similar to following for MongoDB:
db.book.find( { title: /^THE STAND$/i } );


Authentication error.

Hello!
Appears this, after enter with the autenticated url on terminal:
Something went wrong, here is the API response:
{"error":"server_error"}
I have downloaded master.zip and put bash-json-parser manualy inside libs. What could be wrong?
Thank you!

It seems like you have entered the complete url after authenticating.
When the url is https://login.live.com/oauth20_desktop.srf?code=Md81f7079-1000-1aef-ef28-9e4d00fff7b4&lc=1031, you have to enter only Md81f7079-1000-1aef-ef28-9e4d00fff7b4.
If this was the problem, I'll take it as a hint to optimize this part of the authentication process.

Yes, works now! Many Thanks!


Allow the use of single quote characters in Javadoc task options header and footer

Fix and test for the following issue.
gradle/gradle#1090
Any of the checked boxes below indicate that I took action:

[x ] Reviewed the Contribution Guidelines.
[x] Signed the Gradle CLA.
[x] Ensured that basic checks pass: ./gradlew quickCheck

The report from languageJava:integtest shows the new test passing successfully.
I tried to make sure the fix doesn't break an existing workaround by trying many combinations of backslashes and delimiters (single, double, triple quoted & slashy strings), all variations failed to build.

@mitnuh Thanks for providing the pull request.

I tried to make sure the fix doesn't break an existing workaround by trying many combinations of backslashes and delimiters (single, double, triple quoted & slashy strings), all variations failed to build.

We'd have to make sure existing escape logic still works. Before that we won't merge.

@bmuschko I expect you may not have gotten a notification here, but I think this is ready for another review.

Thanks for the pull request. It has been merged!


Math Error

Why 0^0 = 1?
It should be indeterminate.

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

https://en.wikipedia.org/wiki/Zero_to_the_power_of_zero
Also Duplicate of #418

0 in the power of 0 is 1. The law that says that all x in the power of 0 is equal to 1 is for all numbers, including 0.


Update zio-query to 0.3.4

Updates dev.zio:zio-query from 0.3.1 to 0.3.4.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (0.3.1).
You might want to review and update them manually.
project/versions.scala

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio", artifactId = "zio-query" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "dev.zio", artifactId = "zio-query" }
}]

labels: library-update, early-semver-minor, semver-spec-patch, old-version-remains, commit-count:1

Superseded by #151.


⚠ Bofrost.at has degraded performance

In 417f7d2, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 963 ms

Resolved: Bofrost.at performance has improved in 6ade3bc after 9 minutes.


IntelliJ Maven Projects are not working

Not sure whether this is a bug or an enhancement.
Problem description
It seems, that in some cases people use Kotlin with Maven and export it from IntelliJ. This is the case for study homework at university. But it seems, it doesn't work by default. The pom.xml file is incomplete and maven commands or the launch configuration don't work.
Extension version
I am running the latest available version in the marketplace that is tagged as "preview".
How to fix it
It took me a lot of time but I figured out how to edit the pom.xml to make it run. This is what needs to be in the pom.xml to run.
Required dependencies (stdlib and testing):
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>

Required build elements (these were missing as well!):

<sourceDirectory>src/main/kotlin</sourceDirectory> (the main source directory, could also be src/main/java or src/main/resources or sthg. like that)
<testSourceDirectory>src/test/kotlin</testSourceDirectory>  (same as before but with test instead of main)

Required plugins (Kotlin compilation, Maven assembly):
<plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <configuration>
                    <jvmTarget>${java.version}</jvmTarget>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals> <goal>compile</goal> </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals> <goal>single</goal> </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>${main.class}</mainClass>
                                </manifest>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Optional plugin (Java compilation, for mixed projects):
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
                <executions>
                    <!-- Replacing default-compile as it is treated specially by maven -->
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <!-- Replacing default-testCompile as it is treated specially by maven -->
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>java-compile</id>
                        <phase>compile</phase>
                        <goals> <goal>compile</goal> </goals>
                    </execution>
                    <execution>
                        <id>java-test-compile</id>
                        <phase>test-compile</phase>
                        <goals> <goal>testCompile</goal> </goals>
                    </execution>
                </executions>
            </plugin>

Optional, these are the properties I use:

java.version
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.8.22</kotlin.version> (a new one as of this writing)
kotlin.compiler.jvmTarget
main.class
junit.version

If one of these things is missing, it's likely that the project won't run.
MainKt ClassNotFoundException
This happens sometimes because some Maven plugin (or whatever it is) puts Kotlin Source files in the classpath ./target/classes and puts all compiled .class files in some other path ./target/kotlin-ic/compile/classes.
If then the Kotlin-Launcher tries to execute the application, given the main class, it won't find it. I also noticed that the Kotlin-specific classes directory is sometimes flattened, sometimes not, which also led to ClassNotFoundExceptions on startup, because the classes were not in the right directory.
I wrote a simple bash script that copies all classes to the correct classpath location:
#!/bin/bash

fromDir="./target/kotlin-ic/compile/classes"
classpath="./target/classes"

for kotlinFile in $(find ${classpath} -name "*.kt")
do
	destinationDirectory="$(dirname "${kotlinFile}")"
	for className in $(grep -Po '(?<=\bclass )[A-Z]\w*' ${kotlinFile}) "$(basename "${kotlinFile%.*}")"
	do
		mv -t "${destinationDirectory}" $(find ${fromDir}/ -name "${className}*.class")
	done
done

A lot of what you mention that needs to be added is simply standard Kotlin setup for Maven. I'm surprised that IntelliJ does not export them. Does the project even compile with mvn clean install without adding it?!? 😱
This is probably also not a VSCode extension issue, but a language server issue. @fwcd , maybe we could move it?


Feature: import individual files

Problem
This isn't a problem as such. It is a thought I had. I've been playing around with Deno a bit and I do think that importing modules from a remote URL isn't only pretty efficient but also much easier than speicifying a whole bunch of dependencies. This would probably also improve build times by a whole lot. Rust is hypersonic in production, let's make it hypersonic in development.
Proposed Solution
Here's my idea: Say you'd like one specific function from one specific module but you don't want to import a whole module and compile the whole module just to access that one function. Instead you just do this:
mod "https://raw.githubusercontent.com/angeldollface/chico/main/src/modules/binary.rs"

use binary::bin_to_dec;

Just that one file is compiled and any other files it depends on.
Cargo would cache the file somewhere and you could fall back on it if you want to use the same function in another project.
Notes
I would work on this as a plugin. However, I need to understand how Cargo fetches and compiles dependencies.

I think this is more of a language proposal that might be backed up by changes in cargo, than a cargo feature.
Generally, the path forward for something like this is to consider

Why the current system works the way it does

For example, a major feature of the current design is the be "leftpad safe".  By directly referencing a dependency, how do we keep that?  I believe deno's approach is to not be prescriptive about this but to still offer a hosting service

What problems the proposed idea may have

For example, very few projects are structured to allow referencing a single module within it.  Some people have talked about "subcrates" as a concept that strictly enforces boundaries, allowing more parallel compilation and would work as a target for this.

How to resolve those problems

Then post a "Pre-RFC" on internals.  The RFC format helps in making sure different points are considered and help you communicate them out.

Hi Ed! @epage You might remember me, but under a different name. When we talked last I was called "iamtheblackunicorn" and I asked you about a static-site generator I had written, called Acid. I rewrote the static-site generator with massive improvements in features and code quality and it is now called Mandy. You can find that project here. Mandy still uses the same knowledeg that you so helpfully gave me plus the file-serve crate. I never thanked you enough. She's quite over-powered, would love to hear/read what you think. You could also drop by the Discord if you like.
I'm sorry for the late reply but I was really busy with university. I still am but I've kept you waiting long enough. About my suggestion:

What is "leftpad safe"? Never heard of this. :see_no_evil:
Ad potential problems: The plugin could possibly only fetch and compile the modules that are required?

Hyped to hear your thoughts! :heart:

I believe Ed was talking about the leftpad incident ^1 in npm ecosystem. IIRC the author of widely used package leftpad yanked their leftpad from npm registry, making lots of package depending on that failed to build.
The Rust community also has a centralized registry crates.io. However, a yanked package can continue compiling if you have a Cargo.lock containing that package. Without the proposed URL referenced module, it might fall into the same situation if someone removed their package from that URL.

this is more of a language proposal that might be backed up by changes in cargo, than a cargo feature.

Unfortuately Cargo knows nothing about Rust module systems and source code. This is why Ed suggests seeking opinions from outside Cargo project frist. The feature might start from a language change, requiring the language team's involvement a lot I believe.

So doing this as plugin or macro wouldn't work?

It might work but is out of the scope that Cargo currently handles. Cargo is a build system for Rust not a Rust compiler. Changing the meaning of mod should start a talk with the lang team. Cargo won't parse .rs files by itself in the near future.
That being said, there is a semi-related unstable feature -Zscript https://github.com/rust-lang/cargo/issues/12207. It indeed parses some source code like doc comments.

Hmm, I'll work on this some time soon.


Optimize the hathi file to include only the allow resources.

child of #694

we dont need to do this anymore


md either misses text/words or formats wrong at times

The value in 'text' field for a page looks correct and has better information compared to 'md'.  Look at page 18 of this attached pdf.
policy.pdf
The 'text' field starts correctly with 'Hospital accommodation' .... but the 'md' field ommits it completely and starts with 'Charges for .....' . Also, the formatting in 'md' for rest of the text is messed up and not to mention spelling mistakes etc.
All that to say that the 'text' looks correct, its just conversion to 'md' that is wrong at time and hence unreliable when using both 'LlamaParseJsonNodeParser' or 'MarkdownElementNodeParser'.

Page 18: Text
'Hospital accommodation\nCharges for a standard or semi-private hospital room accommodation, not a private room or suite, or for outpatient\nservices provided by an active treatment hospital in an emergency while travelling outside your province or territory of\nresidence. These charges must be more than the amount paid by your government health insurance plan.\n\n\nHospital expenses\nPayment of up to $100 per emergency hospital stay while travelling, to cover incidental expenses. You must provide paid\noriginal receipts with your claim.\n\n\nMeals and accommodation\nWe’ll pay up to $150 per day, to a maximum of $1,500 per policy, for your commercial accommodation and meals when\nreturn to your province or territory of residence is delayed beyond your scheduled return date due to illness or injury to\nyourself or a travelling companion. An attending physician or nurse practitioner must provide a written statement that you\nor your travelling companion are unable to travel due to the illness or injury. Claims must be supported with detailed\noriginal receipts from commercial organizations and medical reports.\n\n\nMedical appliances\nThe cost of splints, casts, crutches, canes, slings, trusses, walkers, or the temporary rental of a wheelchair when\nprescribed by an attending physician or nurse practitioner, obtained outside your province or territory of residence, and\nrequired due to an accident or unexpected illness.\n\n\nParamedical services\nCharges up to $300 for services provided by a licensed or registered: physiotherapist, chiropractor, chiropodist, podiatrist\nor osteopath, including x-rays, when required for emergency treatment.\n\n\nPrescription drugs\nDrugs, serums and injectables prescribed by a physician, nurse practitioner or dentist and supplied by a licensed\npharmacist, physician, nurse practitioner or hospital. This doesn’t include vitamins, patent or proprietary products, when\nrequired for emergency treatment. You must submit original, paid receipts for claim purposes.\n\n\nPrivate registered nurse\nCoverage to a maximum of $3,000 for charges of a licensed, private registered nurse, who isn’t an immediate family\nmember, who performs registered nursing duties, during and immediately following hospitalization, when ordered by the\nattending physician or nurse practitioner.\n\n\nRelief of dental pain\nTreatment for the emergency relief of dental pain, other than accidental dental, is covered to a maximum of $200.\nTreatment must be performed at a location at least 200 km from your province or territory of residence.\n\n\nReturn of deceased\nA maximum of $3,000 towards the cost of preparation and transportation to the province or territory of residence of aS A M P L E\ndeceased insured person, excluding the cost of a coffin, or up to $2,500 towards the cost of cremation or burial at the\nplace of death, outside the province or territory of residence of the deceased insured person.\n\n\nTreatments - blood\nThe cost of whole blood, blood plasma or specialized treatments using radium and radioisotopes are covered, when\nprovided due to emergency hospitalization.\n\n\nMF_FlexCare_With_Vitality_Contract_E_0521                                                                                Page 18 of 32'
Page 18: MD
'#\nCharges for a standard or semi-private hospital room accommodation, not a private room or suite, or for outpatient services provided by an active treatment hospital in an emergency while travelling outside your province or territory of residence. These charges must be more pan pe amount paid by your government healp insurance plan.\n\nPayment of up to $100 per emergency hospital stay while travelling, to cover incidental expenses. You must provide paid original receipts wip your claim.\n\n\nWe’ll pay up to $150 per day, to a maximum of $1,500 per policy, for your commercial accommodation and meals when return to your province or territory of residence is delayed beyond your scheduled return date due to illness or injury to yourself or a travelling companion. An attending physician or nurse practitioner must provide a written statement pat you or your travelling companion are unable to travel due to pe illness or injury. Claims must be supported wip detailed original receipts from commercial organizations and medical reports.\n\n\nThe cost of splints, casts, crutches, canes, slings, trusses, walkers, or pe temporary rental of a wheelchair when prescribed by an attending physician or nurse practitioner, obtained outside your province or territory of residence, and required due to an accident or unexpected illness.\n\nCharges up to $300 for services provided by a licensed or registered: physioperapist, chiropractor, chiropodist, podiatrist or osteopap, including x-rays, when required for emergency treatment.\n\nDrugs, serums and injectables prescribed by a physician, nurse practitioner or dentist and supplied by a licensed pharmacist, physician, nurse practitioner or hospital. This doesn’t include vitamins, patent or proprietary products, when required for emergency treatment. You must submit original, paid receipts for claim purposes.\n\nCoverage to a maximum of $3,000 for charges of a licensed, private registered nurse, who isn’t an immediate family member, who performs registered nursing duties, during and immediately following hospitalization, when ordered by pe attending physician or nurse practitioner.\n\n\nTreatment for pe emergency relief of dental pain, oper pan accidental dental, is covered to a maximum of $200. Treatment must be performed at a location at least 200 km from your province or territory of residence.\n\n\nA maximum of $3,000 towards pe cost of preparation and transportation to pe province or territory of residence of a deceased insured person, excluding pe cost of a coffin, or up to $2,500 towards pe cost of cremation or burial at pe place of deap, outside pe province or territory of residence of pe deceased insured person.\n\n<treatments - blood>\nThe cost of whole blood, blood plasma or specialized treatments using radium and radioisotopes are covered, when provided due to emergency hospitalization.'

Hi!
It seems your document run into a bug, we will adress it.
(for some reason the text in your layout is not extracted correctly)

Thank you, if you can please reply to this thread whenever the bug is fixed, that would be much appreciated.On Jun 18, 2024, at 3:53 AM, Pierre-Loic Doulcet @.***> wrote:
Hi!
It seems your document run into a bug, we will adress it.
(for some reason the text in your layout is not extracted correctly)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>


Fix the NegativeInt.compareTo(PositiveInt)'s documentation

Description
Replace "or a positive number if it's greater than other" by "or a negative number if it's less than other" in the NegativeInt.compareTo(PositiveInt) function.
Checklist

[ ] Fix.
[ ] Update Work in progress section in changelog.

Already included in #49.


HassOS .5 doesn't get past "preparing hassio" screen

The last line I see is
IPv6: ADDRCONF(NETDEV_CHANGE): hassio: link becomes ready

Haven't tried the 32bit version yet, but  for the 64bit version, the behaviour seems the same as yesterday. Black boot screen and no ip coming online.

For Rpi 3 model B+

Tried the 32bit with rpi 3 model B+. Booting works, but I get the same result as the OP.

Will be fix with 0.6

Confirmed for me, can the issue be closed?

Is 0.6 a future releays HassOS Release 1 or is 0.6 the beta version?
I get this error everytime I boot my HassOS Release 1 build 5 in ESXi :(

That is not a error, it's only a kernel message

@pvizeli Thanks for the info, the problem was a not supported network adapter

I had the same issue with a 16G card, switched to 32G and it booted.


Mirror changes from dotnet/coreclr,corefx

This PR contains mirrored changes from dotnet/coreclr,corefx
Please REBASE this PR when merging
cc @benaadams

@MattGal Would it be possible to roll back deployment on the CI machines that handle WASM again? Seems like emsdk is missing.

d'oh!  Per @garath we thought that was fixed, will do.

Apologies for the inconvenience, should be rolled back.


Hotfix grant handler fields for avustus2

Two things, separate, but outside the stories:

Fixing two form fields that were sending false values to Avustus2. This is the part that has to do with code:

The form timestamp was using form created -timestamp, not the current time (GrantsHandler.php line 614)
The values of the floats in the subventions and other conventions were being sent as integers because of false parsing, this sends them forward as floats (several places in the GrantHandler)

composer update, remove old modules, update tunnistamo to tunnistamo 2.0

The million other file changes are configuration and language changes.

To test:
pull, composer install, drush cim.
Put the grants handler to debug mode
Go to yleisavustuslomake, fill it with non-integer values for the euro fields. Submit form, see that the values for euro fields retain their floaty nature. See that the correct time is passed to form timestamp field.

What if I tag @strangeworlder here, could that be used as review request?


min value for autoCommitIntervalMillis.   #1774

What is the purpose of the change
prevent the client from committing too frequently, we set 1000ms as min value for autoCommitIntervalMillis
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Coverage decreased (-0.07%) to 50.955% when pulling 3320fd5184a6d3e4c5df24e3ea19b676fabd9574 on uglycow:develop into d03e46a4cb0be50401a4fcd9132392a6dde43861 on apache:develop.


updated as per jira comment

discovered error in sql example to blame for jira FB-2452
This has now been fixed

deploying immediately because it's a tiny verified fix


Packets loss trying to process SIP traffic

Hi,
Im trying to process SIP traffic.
The problem is that when the time difference between packets is less than 1 millisecond I lost the second packet.
There are not much packets per second, but often there are several packets almost at the same time.
EXAMPLE
2020-01-23 15:18:37.242669874
SIP/2.0 200 OK
From: "1003"sip:1003@<IP_ADDRESS>:5060;tag=417857592
...
2020-01-23 15:18:37.242701932 LOST
REGISTER sip:<IP_ADDRESS>:5060 SIP/2.0
...
This is part of my code:
`
// pcap
handle, err = pcap.OpenLive(device, snaplen, promisc, pcap.BlockForever)
if err != nil {
	log.Fatal(err)
}
defer handle.Close()

// Set filter
var filter string = conf.Filter
err = handle.SetBPFFilter(filter)
if err != nil {
	log.Fatal(err)
}

packetSource := gopacket.NewPacketSource(handle, handle.LinkType())
//	for packet := range packetSource.Packets() {
//		udpQueue <- packet
//	}

for {
	packet, err := packetSource.NextPacket()
	if err == io.EOF {
		break
	} else if err != nil {
		fmt.Println("ERROR: ", err)
		continue
	}

	//se procesan FIFO desde udpQueueConsumer
	udpQueue <- packet
}

`
I also tried afpacket with similar results...
`
// afpacket
afpacketHandle, err := newAfpacketHandle(iface, szFrame, szBlock, numBlocks, addVLAN, pcap.BlockForever)
......
source := gopacket.ZeroCopyPacketDataSource(afpacketHandle)
defer afpacketHandle.Close()
for ; count != 0; count-- {
	data, _, err := source.ZeroCopyReadPacketData()
	if err != nil {
		log.Fatal(err)
	}

	......

}

`
Thanks in advance
Best Regards

It sounds like the issue may be processing speed in your handler, not the read layer.  Packets are likely being dropped while your handler is doing things to each packet.
Things you can try:

Dumping the packets into a buffered channel
Using multiple readers to process an unbuffered channel
Buffer into a file system queue and process in batches

You are right, my channel is not buffered...


Build error

I am trying to build your firmware with pico-sdk, and I hit the following error:
[ 26%] Building C object CMakeFiles/dirtyJtag.dir/get_serial.c.obj
In file included from /code/pico-dirtyJtag/get_serial.c:27:
/code/pico-sdk/src/rp2_common/pico_unique_id/include/pico/unique_id.h:72:52: error: unknown type name 'uint'; did you mean 'int'?
   72 | void pico_get_unique_board_id_string(char *id_out, uint len);
      |                                                    ^~~~
      |                                                    int
make[2]: *** [CMakeFiles/dirtyJtag.dir/build.make:102: CMakeFiles/dirtyJtag.dir/get_serial.c.obj] Error 1
make[2]: Leaving directory '/code/pico-dirtyJtag/build'

I am using pico-sdk version 1.2.0 (bfcbefafc5d2a210551a4d9d80b4303d4ae0adf7).

Interesting. This error does not appear with an older (1.1) version of the SDK. We need a work around...
Thanks,
Patrick.

From: Benjamin Henrion @.>
Sent: Saturday, June 5, 2021 3:44 AM
To: phdussud/pico-dirtyJtag @.>
Cc: Subscribed @.***>
Subject: [phdussud/pico-dirtyJtag] Build error (#1)
I am trying to build your firmware with pico-sdk, and I hit the following error:
[ 26%] Building C object CMakeFiles/dirtyJtag.dir/get_serial.c.obj
In file included from /code/pico-dirtyJtag/get_serial.c:27:
/code/pico-sdk/src/rp2_common/pico_unique_id/include/pico/unique_id.h:72:52: error: unknown type name 'uint'; did you mean 'int'?
72 | void pico_get_unique_board_id_string(char *id_out, uint len);
|                                                    ^~~~
|                                                    int
make[2]: *** [CMakeFiles/dirtyJtag.dir/build.make:102: CMakeFiles/dirtyJtag.dir/get_serial.c.obj] Error 1
make[2]: Leaving directory '/code/pico-dirtyJtag/build'
I am using pico-sdk version 1.2.0 (bfcbefafc5d2a210551a4d9d80b4303d4ae0adf7).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fphdussud%2Fpico-dirtyJtag%2Fissues%2F1&data=04|01||3ab9f895757d4ad1810708d9280ee09e|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637584866619707595|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=lAYBBHUNlq4PMaMD91MOTIXWkXLLoxXctPewfji31S4%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABVQKX2U3SB4IVL7GXA5NYLTRH5YLANCNFSM46EMOPDQ&data=04|01||3ab9f895757d4ad1810708d9280ee09e|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637584866619717552|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=EuAselzRBQuDKA6tIz0GBsvQGVX2IseHE%2FGKI%2BaiGys%3D&reserved=0.

I think gcc does not define uint anymore.
The fix would be to define it right before the failing include in get_serial.c like so(change in bold)
typedef unsigned int uint;
#include "pico/unique_id.h"

I updated with the version 1.2 of the sdk and it builds with the change. I haven't tested the resulting binary yet.

A better fix is to replace
#include <stdint.h>  by #include "pico/types.h". This header file defined uint the same way I indicated.
This will give us:
#include "pico/types.h"
#include "pico/unique_id.h"

I committed a fix.


Array __repr__ and __str__ can produce misleading text

I think I would call at least the first case below a bug even though it doesn't actually affect any array operations.
There are certain Arrays that have string representations that seem misleading:
>>> import awkward as ak
>>> ak.__version__
'1.2.2'
>>> ak.Array([[True], [], [True], [True], [True], []])
<Array [[True], [], [True, ... [True], []] type='6 * var * bool'>

The comma after the second True makes it seem like there are more elements in that third list. I would have expected something like <Array [[True], [], [True], ... [True], []] type='6 * var * bool'> instead.
Less inaccurate but still potentially misleading are cases like:
>>> ak.Array([[0], [], [0, 1, 2, 3], [1, 0], [0], [], []])
<Array [[0], [], [0, 1, 2, ... 0], [0], [], []] type='7 * var * int64'>

This makes it look like [0, 1, 2, ... 0] is all the same list. You can tell the difference by counting the number of entries and comparing to the length of 7, but I would have expected something like <Array [[0], [], [0, 1, 2, ... ], ... [ ... 0], [0], [], []] type='7 * var * int64'>.
(Actually, it's always confused me why __repr__ and __str__ don't just show the whole array like numpy. I guess ak.to_list() always works for that at least.)

NumPy doesn't always show the whole array, either, but its cut-off is much higher: at 1000 entries or so. Because of its regular structure, NumPy can also cut the array in a mood logical place, whereas there's no guarantee that an Awkward Array is going to have a non-misleading place to cut.
Independent of that, I also wanted the string representations to fit on one line—the maximum length of the line was chosen so that it wouldn't create scroll bars on GitHub or StackOverflow. That makes it possible to just paste examples without making the code examples hard to navigate. They could, like NumPy, have multiple lines that never exceed a certain width, but that garbles dicts and lists of arrays. I'm surprised there aren't more complaints about that with NumPy—it can be very hard to read.
Another consideration in creating string representations is that the array might contain virtual arrays and we don't want to trigger materialization too easily. Any array elements that get printed must be materialized (usually that means reading from disk or over a network), and the virtual arrays are usually set up such that each record field is independent and there are large row chunks that are independent. Since the string representation includes both ends of the array, the first and last chunk will be read, and if there's only room for two or three fields, then only those will be read. Making the string representation wider will mean more up-front data reading.
The tolist method will show everything (and IPython-like things will format it nicely), but for large arrays, you don't want to read everything and show everything.
Perhaps the right thing to do is to give you more control over the representation. The str and repr functions don't take arguments, but maybe there can be a global parameter (or a context manager) that affects the allowed length of the strings. Or maybe a show method that takes arguments. It would be very easy to increase the length, it would be somewhat harder to add line breaks to keep the line width under a maximum (you'd have to get into ak._util.minimally_touching_string), and I don't know how one would ensure that the "..." only appears in logically meaningful places (i.e. balances parentheses). Currently, the algorithm adds tokens until the length would exceed a maximum—to keep the parentheses balanced, you'd have to change the granular unit from tokens to syntactic groups. In many cases, there would be nothing to show because the smallest syntactic unit is too large.
I'm going to label this a feature request.

The problem here is that it's choosing confusing truncation points based solely on the string. It should not truncate across different level lists anymore than it should truncate the middle of a number. If truncating deep in a list is required, it should truncate each, like <Array [[0], [], [0, 1, 2, ...], ..., [0], [], []] type='7 * var * int64'> for example. One "property-based" test would be the number of [ should match the number of ] in the repr for all reprs.

PS: The test I mentioned only catches the first example, the inside lists being merged in truncation would not be caught by that test.


Update Angular and dependencies to v7

Angular 7 released late October 2018.
Changelog: https://github.com/angular/angular/blob/master/CHANGELOG.md
Release policies and predictions: https://angular.io/guide/releases

The dod of such an update contains these additional points:

Update the installation doc.  (Angular CLI version, specific commands used, dependency list and versions, ... ) https://github.com/SAP/cloud-commerce-spartacus-storefront/blob/develop/docs/setupandinstallation.md

Make sure to test and evolve the QA installation script, which might have been aligned with the installation do by then.
https://github.com/SAP/cloud-commerce-spartacus-storefront/blob/develop/docs/setupandinstallation.md

waiting for ngrx 7, revisiting when it's released


Added support for updateFriendlyURL()

Right now admin.js throw an error when entering Blog post title due to missing PS_ALLOW_ACCENTED_CHARS_URL variable.
Blog category name not even trying to populate URL rewrite.

Thank you for the contribution. I have picked modified version of your fix to the codebase - see commit  6022b479caafbad1f06b0c63cc7d5d20e72ec20a

Are you sure that all changes were merged?
I dont see the tpl files in the master repo.

I didn't merge your pull request, I used to to as a basis for different fix.
The reason why you added helper overrides was to inject javascript variable into the page. There's a better way to do that - use Media::addJsDef method

Perfect.
There should be other places where you can use that approach, because originally I took that part of the code from other templates i found.


Rename Chinese localization files

I suggest that DBeaver rename the following two bundle_xxx.properties into:

bundle_zh.properties -> bundle_zh_CN.properties
bundle_tw.properties -> bundle_zh_TW.properites (at least modify these files)

Otherwise, the Resource Bundle of IntelliJ will identify bundle_tw.properties as 特威文 instead of 中文/台灣.

Originally posted by @hwhsu1231 in https://github.com/dbeaver/dbeaver/issues/19574#issuecomment-1493834426

I can work on this issue. May you please assign it to me? @E1izabeth

Yes, you can work on it.

@SiyaoIsHiding how is it going? Are you still working on it?

I hope this issue can be solved as soon as possible since I want to keep going to contribute the zh_TW localization.

Yes. Sorry, I worked on another issue #19743 first. I will work on this one soon.

I am sorry that it turns out this issue does not fulfill the requirement of our coursework project. Therefore, we will not work on this issue anymore. Sorry for the inconvenience.

We're aware that people who use locale other than zh_CN and zh_TW couldn't use localization anymore as, for example, zh_SG won't match to zh which is zh_CN now anymore. I don't see a good solution here, but if you can suggest something in this case, we're ready for discussion.


Flush function in Screenbuf/screenbuf.go assumes one line in terminal per line entry

The Flush function, which prints to the terminal, resets the pointer after every user input, by traversing up the terminal pointer with a value of s.height.
This works if s.height is exactly the amount of lines actually taken in the terminal output.
However, I have a line in my output that wraps more than one line (Actual line taken: 5, s.height: 4).
This results in the future user input being pushed down one line, as the for loop
for i := 0; i < s.height; i++ {
	_, err := s.buf.Write(moveUp)
	if err != nil {
		return err
	}
}

doesn't point towards the starting point anymore

dig into that and i found a way to walk around it. I implemented my own write and flush function, simply to calculate and set height correctly as the # of output lines.


Label image to point clouds and mesh

Description
Include a function that takes in directory of 3D label images and for each label writes a point cloud and mesh object for each labelled object. The border label objects are ignored.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[ ] New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Tested on a real dataset that contains patches of XYZ labelled images.
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

I verified the code and it produces nice binary images, there is a min_size tuple field that is optional, it is to ensure that the binary images created are above a certain size to prevent marching_cubes errors due to it not finding any vertices, something that can happen if the 3D mask is (2,2,2) size.


Ignore certain elements in  or  tags

Is there a way to ignore certain HTML elements inside pre or code tags?
Let's say I have the following HTML string:

This will render a pre tag and a div to the page, but I want the pre tag as an actual tag, and the div as text. However, should there be any
 tags inside the
, they should be rendered as a tag as well.

You should be able to use a transform function to achieve this.
Each time tranform is called it is passed the current node, which includes information about it's parent. Using this you can walk up the node hierarchy and figure out if any node is inside a
 tag and then transform it into the shape that you want.
function transform(node) {
  if (node.parent.type === 'tag' && node.parent.name === 'pre') {
    // node is inside a
 tag so do something different to it
  }
}

There's an example of transform in action as part of the demo site.

I'll give that a try! I did however find another way to solve my problem. By replacing the '<' and '>' tags with html entities (< >) the string just gets rendered as text and not as a react element.

That's probably an easier way to do it if you can do that before passing anything to react-html-parser. Then the library will just treat the entire contents of the
 tag as one big string and you won't need to do any additional processing to check the parent for every node.


Bug in Cue help system.

What version of CUE are you using (cue version)?
v0.1.0 c24f394d707d4dadaa27e0d49790eed2523815af

Does this issue reproduce with the latest release?
yes
What did you do?
There seems to be a minor bug in the help system.
$ cue --help
pflag: help requested

cue cmd --help shows the same pflag output. Other subcommands are OK and show their help message.
What did you expect to see?
To see the root help message for cue --help and to see the cmd help message for cue cmd --help
$ cue help
cue evaluates CUE files, an extension of JSON, and sends them
to user-defined commands for processing.

...

$ cue help cmd
...

What did you see instead?
pflag: help requested

Looks to be about here I think: https://github.com/cuelang/cue/blob/master/cmd/cue/cmd/root.go#L221

This issue has been migrated to https://github.com/cue-lang/cue/issues/340.
For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.


refactor(sdg): remove backported SDG indicators that we have ETL version

We now have ETL version of SDG indicators which is better than backported version.
(Dataset wdi__2022_05_26 came from ETL and is not being imported any more, so SDG stopped working anyway)

It would be good to keep the backported version of the SDG Tracker as it has different variables in than the un_sdg import.
The SDG Tracker variables are made up of a bunch different datasets and are a lot more curated than what is in the un_sdg bulk import.
We would ideally be able to have a download of just the data used in the SDG Tracker and for users to be able to download this separately, in a similar sense to the CO2 repo.
Would it be okay with you to keep it even though it's not currently working? Sorry the update of the SDG Tracker has been on the back-burner a bit this year but this backport of all the data used in the SDG Tracker is still a valuable thing to have access to.

@spoonerf thanks, that makes sense. I'll fix it then in a different PR.


v1.7.1 Release

Motivation
Hotfix release v1.7.1 to include fix #5313

:tada: This PR is included in v1.7.1 :tada:


Doesnt build in production mode at angular2-webpack.

Error message:
"Error encountered resolving symbol values statically. Calling function 'JsonSchemaFormModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in C:/Users/mmv/angular2-webpack-starter-master/src/app/app.module.ts, resolving symbol AppModule in C:/Users/mmv/angular2-webpack-starter-master/src/app/app.module.ts"
I had tried include like, as in the documentation:
@NgModule({
declarations: [ AppComponent ],
imports: [
BrowserModule, FormsModule, HttpModule,
MaterialModule.forRoot(), JsonSchemaFormModule.forRoot()
],
providers: [],
bootstrap: [ AppComponent ]
})

I believe this has been fixed in the latest version (v0.4.0-alpha7). That version has been tested and confirmed working with the latest Angular CLI, which uses Webpack.
Can you confirm wether or not it works with the setup you're using?


dart2js produces wrong code with reference to local variable and return statement in catch clause

import 'dart:async';

class Disposable {
  void dispose() {
    print("Dispose!");
  }
}

void someFunctionThatMayThrow() {
  print("someFunctionThatMayThrow called");
}

Future<String> foo() async {
  await new Future.delayed(new Duration(seconds: 2));

  return "Hello!";
}

Future<Disposable> bar() async {
  await new Future.delayed(new Duration(seconds: 1));

  return new Disposable();
}

Future<Null> main() async {
  Future<String> fooResult;

  Disposable barResult;

  try {
    barResult = await bar();

    fooResult = foo();

    someFunctionThatMayThrow();
  } catch (e) {
    barResult?.dispose();

    return;
  }

  Future<Null> printFooResult() async {
    try {
      print("fooResult is $fooResult");

      String result = await fooResult;

      print("Result is $result");
    } finally {
      barResult?.dispose();
    }
  }

  printFooResult();
}

fooResult evaluates in null inside printFooResult method body when compiled with dart2js.
Works fine in dartium.
Works fine if I remove return statement or barResult variable reference from catch block body.
Dart sdk version is 1.22.1-1 on Ubuntu 16.04.
Code behavior is wrong in DartPad too.
Fails also if return is replaced with rethrow statement.

Thanks for the report.
I'm not working on dart2js anymore, but I couldn't resist to have a short peek. Here is the generated code that makes things go wrong.
       while (true)
          switch ($async$goto) {
            case 0:
              // Function start
              t1 = {};   // <================= box for the captured variables.
              t1.fooResult = null;
              t1.barResult = null;
              $async$handler = 4;
              $async$goto = 7;
              return P._asyncHelper(X.bar(), $async$main, $async$completer);
            case 7:
              // returning from await.
              barResult = $async$result;
              t1.barResult = barResult;
              t1.fooResult = X.foo();  // <=========== the box' value is correctly set.
              P.print("someFunctionThatMayThrow called");
              t1 = barResult;  // <================ this overwrites the box...  BUG.
              t1 = t1;       // <================= that doesn't look necessary either :)
              $async$handler = 2;
              // goto after finally
              $async$goto = 6;
              break;

Same behavior is observed today.


fix(images): images optimized to save server space

Issue #454 fixed - image optimization

@krishnasvp
@yasell meant to just not change package-lock.json not to delete it entirely

Hey @yasell and @xmulligan! Sorry about the mistake. I have restored the package-lock.json to its original.
Thank you.


Adding target dtype argument to save function

In "sox_io" backend and "soundfile" backend with new interface, when saving a Tensor to file withsave function, it is expected to that client code converts the Tensor to the dtype with desired precision. It was pointed out that this is somewhat inconvenient and save function should handle type conversion for improved UX. (See #903)
To address this, we would like to add a new parameter dtype to save function so that dtype conversion is handled by save function.
Specification

dtype is optional string type, valid values are ("uint8", "int16", "int32", "float32", "float64" and None)
dtype=None means no conversion is performed.
dtype parameter is only effective for float Tensor.

If user provide a Tensor with other dtype, (like uint8), dtype parameter is ignored and no conversion is performed.

In release 0.8

The default value of dtype is None, for the sake of backward compatibility.

In release 0.9

The default value of dtype is changed to int16.

Migration plan

Release

0.7
0.8 (Default to `dtype=None`)
0.9 (Default to `dtype=int16`)

The precision of saved audio depends on the input Tensor dtype.

`dtype` parameter is added to `save` function
If the input Tensor is float type and `dtype` is `None`,    then issue warning saying the default value will be changed to `int16`.

 `dtype` parameter defaults to `int16`.

Implementation direction for contribution

Add a helper function that performs dtype conversion with value range adjustment.
This function should be placed in torchaudio/backend/common.py and performs the conversion between the following dtype / value range.

uint8: [0, 255]
int16: [-32,768, 32,767]
int32: [-2147483648,<PHONE_NUMBER>]
float32: [-1.0, 1.0]
float64: [-1.0, 1.0]

Add dtype parameter to save functions of "sox_io" backend and "soundfile" backend with new interface.
Set the default value of dtype parameter to None and perform the conversion if the following conditions are met;

The input Tensor is float32 type
dtype parameter is given.

Add warning when the input Tensor's dtype is float32 and dtype parameter is not given (None), saying that the default value will be changed to dtype='int16' in 0.9 release.

Building and testing locally
The save_test.py needs to be updated.
To work on this, torchaudio needs to be built from source. Use of conda environment (anaconda/miniconda) is highly recommended.
Also, build requires cmake and nightly build version of PyTorch. Refer to pytorch.org for the installation.
To install cmake, do pip install cmake.
Once the environment is setup, the following command will build and run the corresponding tests
BUILD_SOX=1 python setup.py develop
(cd test && pytest torchaudio_unittest -v -k "save_test"

@mthrok I can work on this

@mthrok I can work on this

@mthrok I can work on this

@carolineechen Thanks. Let me know if you need help.

@mthrok I can work on this

@carolineechen Thanks. Let me know if you need help.

An alternative approach
Following the offline discussion with @carolineechen, I noticed that we do not need custom un-normalization function. We can just change the part sox converts the internal representation (int32_t) to target encoding.
Steps

Add target dtype to

save
save_audio_file [header, impl]
save_audio_fileobj [header, imp]

Change the encoding_info to have target dtype (if given) or the native dtype.
In save_audio_file and save_audio_fileobj, replace tensor.dtype() with a logic to use the given dtype or tensor's dtype. (Add a helper function to convert std::string to caffe2::TypeMeta, which will be similar to get_dtype function)

An alternative approach
Following the offline discussion with @carolineechen, I noticed that we do not need custom un-normalization function. We can just change the part sox converts the internal representation (int32_t) to target encoding.
Steps

Add target dtype to

save
save_audio_file [header, impl]
save_audio_fileobj [header, imp]

Change the encoding_info to have target dtype (if given) or the native dtype.
In save_audio_file and save_audio_fileobj, replace tensor.dtype() with a logic to use the given dtype or tensor's dtype. (Add a helper function to convert std::string to caffe2::TypeMeta, which will be similar to get_dtype function)

Closing as I need to reconsider the approach for clean interface and proper mapping to encodings and bits.


MAIN - update hex colors

Heeeya! ✌
@Weetbix as we privately talked the other day this PR will update the hex so that it is alligned with the design.

Warnings

:warning:
Missing reviewer - Looks like this pull request is missing a reviewer. That's OK as long as this PR is still a 'work in progress', if that is the case please add 'WIP' in the PR title or corresponding label.

Messages

:book:
✅  Get a 🏆 for adding description on this PR. - Celebrate on every step!

  Generated by :no_entry_sign: dangerJS against 3fb71db7b133e5481aae1ffa390cc45f3ff625f6


Write docs for statefulset feature in v1.2

Fixes #381

Was just looking over the demo walkthrough. When are where are the kafka service accounts being created?

The service accounts are being created as part of the zookeeper and kafka helm charts. That's what the --set serviceAccount.create flag does.

Fixes submitted in #383


[SR-7938] Add URLProtectionSpace.description

Hi, first-time contributor here—hoping this PR is useful. It was actually harder to implement than I was expecting.

You may need to change XCTAssert(space.description.hasPrefix("<URLProtectionSpace ")) to XCTAssert(space.description.hasPrefix("<\(type(of: space)) ")) since Darwin looks to use NSURLProtectionSpace internally

@swift-ci please test

@spevans the DarwinCompatabilityTests crash on running, before I even add my test file. I'm getting:
Thread 1: Fatal error: The unit test must specify the correct number of flags and arguments. in the xdgTestHelper.

@spevans in DarwinCompatibilityTests I had to comment out a couple of tests in TestBundle, as they were causing the project not to build. Not sure if I should leave them commented out, or how that works? Otherwise, I got my code passing with one minor tweak to my test file. Now it passes in both.

Welcome @cmilr and thanks for the contribution!

@swift-ci please test and merge


Week Ending March 6, 2022

/lgtm
Trying to see if this make Pages work again.

/label lgtm

/lgtm


add silent attribute to H2OConversableAgent init

Fixes #1842

https://github.com/h2oai/h2ogpt/commit/a9b97158d1d5f3a8fbb47246e28327e7609bc903
need to pin version.  Let's start to pin, since too many deep changes in autogen code that will break arbitrarily.


3.x - fix: typecast strings

On PHP 7.3 you will get:
( ! ) Deprecated: stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /vendor/slim/slim/Slim/Http/Uri.php on line 211

Coverage remained the same at 97.999% when pulling 997e8fa4bcdc08441d4d00760d93bc1ae688a3b3 on TXC:fix/deprecation-notice into dd9c65ec16aba555e351887a086c22f15ecfc3bf on slimphp:3.x.


Error migrating deleted attachment

Describe the problem
I'm seeing multiple attachment warnings\errors during export and import:
During export:
[W][19:42:54] Cannot find info for attachment '86152', skipping. Reason 'Response Content: {"errorMessages":["The attachment with id '86152' does not exist"],"errors":{}}'.

Now a remove change exists for an attachment that never got added:
{
      "Author": "someauthor",
      "Time": "2021-02-03T09:26:15.327+01:00",
      "Index": 32,
      "Fields": [],
      "Links": [],
      "Attachments": [
        {
          "Change": 1,
          "FileName": null,
          "Comment": "Imported from Jira",
          "AttOriginId": "86152",
          "FilePath": null
        }
      ],
      "AttachmentReferences": true
    },

During import this throws an error:
[E][20:00:21] Could not find migrated attachment '[Removed] 86152/'.
[W][20:00:21] ''ISSUE-22170', rev 12' - not all changes were saved.
[W][20:00:21] Skipping saving attachment 86152, since that attachment was not found.

This happens when:
An attachment has been added on the issue and has been removed later. This means the attachment is not present on the 'latest' version of the issue, and thus cannot be downloaded. The result is a warning on export (this is fine with me) and an error plus warnings on import. I would prefer the import to be free of errors that I cannot fix.
Since this case cannot be solved by the migration tool (the attachment is deleted and can only possibly be recovered from the filesystem on the Jira server or from back-up, see: https://confluence.atlassian.com/jirakb/how-to-restore-a-single-attachment-to-an-issue-608731471.html My suggestion is to not try to migrate attachments that are not currently present on the issue.
The same is true for Jira Cloud. An uploaded attachment gets a URL like https://someaccount.atlassian.net/2aea5cdc-96c2-46c8-8a15-4a4b9558cc25 after deleting it from the issue, the link immediately goes dead.
To Reproduce
Steps to reproduce the behavior:

Add an issue and save
Add an attachment and save
Remove the attachment and save
See error during migration

Tool version
master

I'll look at your PR as soon as i have time after the upcoming 3.0 release :)

The same issue happens for SCRUM-13 in https://solidifydemo.atlassian.net/jira/software/c/projects/SCRUM

TODO for @Alexander-Hjelm: reproduce the issue in AGILEDEMO so that the integration tests catch it, then validate https://github.com/solidify/jira-azuredevops-migrator/pull/613

PR already merged, closing


Static variables in function and method declarations.

This should have been implemented eons ago. I can understand it's unavailability in class methods (You have to ask yourself why you don't just use a static property in the class itself). But it's becoming a pain to have to manually add funcname.staticvar = ... after my function definitions.
I really need this because:

Parsers written in Typescript. I would like my regular expressions static so I don't have to redeclare them every time I call the function. (ie HTTP RAW Message -> RequiestObject / RAW Cookie -> CookieObject)

Prevent me from polluting the global scope. Its better to link variables to the function if they will only be used in the function:
let x = ...;
function y() {
// do stuff with x
}

Code that is easier to understand. The workarounds that I use are difficult for other people to understand.

Thank you for your time. I really hope this can be implemented before version 2. I'm sure a lot of people will be very happy.
TypeScript Version:
1.8.0
Code
function aFncWithStaticVariable() {
    static let foo = 100;
    static let bar = "bar";
    static private let privar = true; // Just in case
}

Expected behavior:
function aFncWithStaticVariable() {
}
aFncWithStaticVariable._foo = 100;
aFncWithStaticVariable._bar = "bar";
aFncWithStaticVariable._privar = true;

Actual behavior:
test.ts(2,2): error TS1184: Modifiers cannot appear here.
test.ts(3,2): error TS1184: Modifiers cannot appear here.
test.ts(4,2): error TS1184: Modifiers cannot appear here.

The following works currently:
function aFncWithStaticVariable() {
}
namespace aFncWithStaticVariable {
    export let foo = 100;
    export let bar = "bar";
    let privar = true; // Just in case
}

Function-private static variables are a pattern in JavaScript that is a bit awkward to express in TypeScript. I'd certainly make use of the static syntax if it was available inside functions.
The dual function/namespace declaration is a bit unweildy and exposes the variables outside the function, whereas function-static vars are usually a private implementation detail of the function.
I'd like to be able to write something like this:
// Given a Foo, compute the corresponding Bar.
function expensiveComputation(foo: Foo): Bar {

    // Cache common results to save re-computing them
    static let lruCache = new LRUCache<Foo, Bar>();

    // If the result is already cached, return it now
    if (lruCache.has(foo)) return lruCache.get(foo);

    // Compute the result
    let bar: Bar = /*** expensive computation ***/

    // Add to cache and return
    lruCache.set(foo, bar);
    return bar;
}

Which would downlevel to something like (sans comments):
function expensiveComputation(foo) {
    expensiveComputation._lruCache = expensiveComputation._lruCache || new LRUCache();
    if (expensiveComputation._lruCache.has(foo)) return expensiveComputation._lruCache.get(foo);
    let bar: Bar = /*** expensive computation ***/
    expensiveComputation._lruCache.set(foo, bar);
    return bar;
}

Why not use the tried-and-true IIFE approach? Capturing the variable in a closure is actually quite idiomatic and has other advantages as well. Or maybe I'm misunderstanding what you're trying to do...

@aluanhaddad TypeScript uses IIFEs a lot in its downlevelled output (e.g. for namespaces and classes). So things like namespaces and classes are just syntax sugar for what can be equivalently expressed with just IIFEs.
But the syntax sugar serves a purpose - it makes the code easier to read and expresses intent more clearly. Function-static variables could just be another syntax sugar with clear intent, that downlevels to IIFEs.

@yortus indeed, but I don't think that this particular use case warrants an additional concept. It could get quite complicated. For example, if someone tries to use a static variable declaration in a method, what should be the result? Should the method be promoted to a property? Surely not. Should it be shared among instances of the class? Surely not. Should it be an error?

@aluanhaddad  I would restrict this suggestion to function declarations only. As the OP points out, it doesn't make much sense on methods anyway.

Hoisting is another point against the dual function/namespace declaration approach and the IIFE approach.
With hoisting, a function may be called before it is declaration, and that works fine. But it's accompanying namespace won't have been evaluated yet, so referring to any exported variables in the namespace may generate ReferenceErrors.
IIFEs aren't hoisted so are not equivalent to function declarations containing static vars as per this suggestion.

That is indeed true, because namespaces are implemented as IIFEs. However, your example downlevel transpilation example
function expensiveComputation(foo) {
    expensiveComputation._lruCache = expensiveComputation._lruCache || new LRUCache();
    if (expensiveComputation._lruCache.has(foo)) return expensiveComputation._lruCache.get(foo);
    let bar: Bar = /*** expensive computation ***/
    expensiveComputation._lruCache.set(foo, bar);
    return bar;
}

exposes the static, cached property. Also, as you implied, the approach only works with function statements, potentially named function expressions could work as well. It won't work with either => functions or anonymous function expressions. It feels overly specific.

It feels overly specific.

Perhaps for you, but I use this pattern from time to time, especially for memoizing and caching. It's useful in functional code.

your example downlevel transpilation example [...] exposes the static, cached property

Only in the same sense that TypeScript exposes the private properties of classes. They don't show up in intellisense and it's a compile error to reference them outside their scope, but if you bypass the type system with some casts to any you can access them, yes.

Anecdotal, but a quick google search for 'javascript static variable' yields mostly pages asking/describing how to do exactly what's described in this issue. E.g. all from the first page of results:

Stack Overflow: Static variables in JavaScript
How to use static variables in a Javascript function
Create And Use Static Variables In Javascript
JavaScript example: Simulating a static variable
Static variables and methods

I don't think this is an esoteric coding practice.

@yortus one could argue that this practice was highly common when the way to create a "class" in JavaScript up until the syntactic sugar provided with ES6 Classes was to create a constructor function and decorate it with "static" methods and properties and then assign it a prototype.  People have been trying to twist JavaScript to match their expectations of a language for years.

one could argue that this practice was highly common when the way to create a "class" in JavaScript

I think the semantics are quite different in most cases. People coming from C++ or even PHP are quite familiar with static variables. They have quite distinct uses from classes.

People have been trying to twist JavaScript to match their expectations of a language for years.

@kitsonk sure, with the addition of OO class syntax being a particularly successful example of this.

People have been trying to twist JavaScript to match their expectations of a language for years.

Quite. And it has often been to the detriment of their code quality and understanding of the language.

People coming from C++ or even PHP are quite familiar with static variables in functions.

As someone with a C++ background, I don't think TypeScript or JavaScript has any obligation to match my expectations from that language.
There is an established way to do this kind of caching over successive invocations in JavaScript, and it's one of the things the language does very elegantly.

@aluanhaddad it's unclear whether you are arguing that this specific suggestion reduces code quality, or you are generally against new syntactic constructs that have some equivalent ES3. Are you also against classes, namespaces, modules, async/await, types, and other 'twists' too? TypeScript provides two forms of productivity: type checking and downlevelling. Are you against the latter in general, or just this specific case?
If you could furnish an elegant example of a strongly-typed function declaration that caches its results in a private static variable, whilst remaining hoistable, I'd like to see it. It would advance your argument much better than just saying so, IMHO.

it's unclear whether you are arguing that this specific suggestion reduces code quality, or you are generally against new syntactic constructs that have some equivalent ES3. Are you also against classes, namespaces, modules, async/await, types, and other 'twists' too? TypeScript provides two forms of productivity: type checking and downlevelling. Are you against the latter in general, or just this specific case?

To be clear, I'm arguing against this specific case. I'm not against down leveling by any means and async/await, modules, arrow functions, and to an extent classes are all features which raise the level of abstraction in meaningful ways. They are also features which are in, or will likely be in, a future version of ECMAScript.
I suppose that given the requirement for hoistabiliy, the closest you can get today is your example compiled output
function expensiveComputation(foo) {
    expensiveComputation._lruCache = expensiveComputation._lruCache || new LRUCache();
    if (expensiveComputation._lruCache.has(foo)) return expensiveComputation._lruCache.get(foo);
    let bar: Bar = /*** expensive computation ***/
    expensiveComputation._lruCache.set(foo, bar);
    return bar;
}

What I am against is arbitrary, non-orthogonal syntactic  extensions that increase the complexity of the language while introducing a number of sharp edges and special cases. This would introduce a local variable declaration form that is only valid within function statements. But really, my subjective argument has nothing to do with down leveling. I just don't think this warrants downleveling, and the argument that it in language x or language y is not particularly compelling.

the argument that it in language x or language y is not particularly compelling.

nobody has made this argument. But the OP listed three arguments that have some merit.
I think you've mentioned the best argument against this suggestion, which is that it's a syntax extension that does not currently appear to be a JavaScript proposal at any stage. It would be risky to introduce it, as JavaScript might eventually get this feature but with different syntax. I guess @wotsyula you might want to propose this as a syntax extension for ESNext, and if that succeeds one day it will end up in TypeScript.

I guess I can we can all sacrifice the ability to use functions with static variables before they are defined.
foo(); // Error Function used before defenition

function foo() {
    static x = 1;
}

foo(); // Okay

@aluanhaddad By forcing usage after the definition then any form of implementation becomes valid. Also you don't have to include an expression in the function itself to insure the variable is set. I can live with this. It's still better than nothing. I truly understand how difficult it is to implement this in JavaScript. Every solution seems to create 2 or more problems. I agree that the final solution relies in ES
@yortus I'm not a fan of es. I feel that the future of JavaScript is in compilation not advancement of features. What we need are better JavaScript compilers. Not a better JavaScript. Look at the C programming language. Very simple and very usefull. But if we need it we can use C# C++ and many more. JavaScript has been around since 1990s without major improvements. Just because a small group of people are getting together to try to change that doesn't mean its gonna happen tomorrow.

As noted in https://github.com/Microsoft/TypeScript/issues/8419#issuecomment-216351820, the function+namespace pattern is the recommended approach for defining static variables.

Although an approach is suggested here https://github.com/Microsoft/TypeScript/issues/8419#issuecomment-216351820, it seems impossible to use it for instance methods? Correct me if I am wrong.

@ycmjason this feature wouldn't make sense for instance methods. I argued that it would be confusing since it would be special syntax only valid in function statements and maybe named function expression but neither methods nor => functions would make any sense.

What about
    myfunc() {
        const locals: {a:number, b:string} = <any>this.myfunc;
        locals.a = locals.a || 42;
        locals.b = locals.b || "hello world";
    }

?

use var

🙄


Add parameter to override Node module ABI version

Set NEON_NODE_ABI iff the caller specifies a Node module ABI version; else, neon will base it on the constant in the node headers.
Related:
https://github.com/rustbridge/neon/pull/109

Please let me know if there's anything I can do to help test this change. Issues with the ABI version are making it difficult for me to get an Electron app up and running on the Mac, and I'd be happy to test things for use with Electron.

It's be helpful to see that it's working on someone else's system. ;) This should get you up and running with neon+electron (it's what motivated me).
In your neon module, if you point your npm package to depend on

+r
I tested using the latest node 4, 6, 7 with mac and linux.

I'll follow up with the commits from @as-cii that eliminate the env var altogether.


CUDA failed with error invalid argument

#73 introduces the following error specifically on my second GPU (cuda:1). It works fine on cuda:0.
File "/home/dody/sub/venv/lib/python3.10/site-packages/faster_whisper/transcribe.py", line 289, in generate_segments
    result, avg_log_prob, temperature = self.generate_with_fallback(
  File "/home/dody/sub/venv/lib/python3.10/site-packages/faster_whisper/transcribe.py", line 464, in generate_with_fallback
    result = self.model.generate(
RuntimeError: CUDA failed with error invalid argument

Thank you for reporting the issue.
Can you try updating the package ctranslate2 to ctranslate2>=3.10.1?

Still got the same error message. To be sure I echoed the version and it was at this:  ctranslate2.version.__version__: 3.10.1
For your reference, this is the relevant code:
...
    # if cuda:1 -> device=cuda, device_index=1
    device = args.device
    device_index = 0
    if device.startswith('cuda:'):
        device, device_index = device.split(':')
        device_index = int(device_index)

    # ensure latest version
    import ctranslate2
    print('ctranslate2.version.__version__:', ctranslate2.version.__version__)

    # Run on GPU with FP16
    model = faster_whisper.WhisperModel(model_path, device=device, device_index=device_index, compute_type="float16", cpu_threads=args.threads)

    writer = get_writer(args.output_format, args.output_dir)
    for audio_path in args.audio:
        segments, info = model.transcribe(
            audio_path, language=args.language, task=args.task, beam_size=args.beam_size, best_of=args.best_of, patience=args.patience, length_penalty=args.length_penalty,
            temperature=args.temperature, compression_ratio_threshold=args.compression_ratio_threshold, log_prob_threshold=args.logprob_threshold,
            no_speech_threshold=args.no_speech_threshold, condition_on_previous_text=args.condition_on_previous_text, initial_prompt=args.initial_prompt,
            word_timestamps=args.word_timestamps, prepend_punctuations=args.prepend_punctuations, append_punctuations=args.append_punctuations,
        )
...

By specifying export CUDA_DEVICE_ORDER=PCI_BUS_ID or unsetting it, I forced device index 0 to point to either one of the GPU. Can confirm that it does not matter which GPU, as long as device index is specified 1, the error occurs.

Thanks for the details.
I think I know what's causing the error. Tomorrow I will debug on a multi-GPU instance and release a new version of CTranslate2.

The error is fixed in ctranslate2>=3.10.2.
Feel free to reopen if you find something else.

Confirmed ctranslate2 3.10.2 resolves the issue.


Enable a view-only mode for users to see current lobby settings without edit permissions.

already done in another task, unfortunately forgot about this task. Could not find out which task it was commited on.


Make eager service registration explicit and revisit existing one

The registerSingleton-function supports a supportsDelayedInstantiation-argument. When true only proxies of services are injected the actual instantiation happens in slack time or at time of first actual use (whatever comes first). This is often over looked and the default (false, eager) is used. This issue is about

make the eager variant explicit, e.g turn the optional argument into an explicit one
revisit existing eager usages and check if they can support delayed instantiation

[ ] src/vs/editor/common/languages/languageConfigurationRegistry.ts
477, 1: registerSingleton(ILanguageConfigurationService, LanguageConfigurationService, false);

[ ] src/vs/editor/contrib/editorState/browser/keybindingCancellation.ts
28, 1: registerSingleton(IEditorCancellationTokens, class implements IEditorCancellationTokens {

[ ] src/vs/editor/contrib/peekView/browser/peekView.ts
36, 1: registerSingleton(IPeekViewService, class implements IPeekViewService {

[ ] src/vs/editor/standalone/browser/standaloneCodeEditorService.ts
106, 1: registerSingleton(ICodeEditorService, StandaloneCodeEditorService, false);

[x] src/vs/editor/standalone/browser/standaloneLayoutService.ts
66, 1: registerSingleton(ILayoutService, StandaloneLayoutService, false);

[x] src/vs/platform/ipc/electron-sandbox/services.ts
65, 2: 	registerSingleton(id, new SyncDescriptor(MainProcessRemoteServiceStub, [channelName, options], options?.supportsDelayedInstantiation));
91, 2: 	registerSingleton(id, new SyncDescriptor(SharedProcessRemoteServiceStub, [channelName, options], options?.supportsDelayedInstantiation));

[ ] src/vs/platform/undoRedo/common/undoRedoService.ts
1396, 1: registerSingleton(IUndoRedoService, UndoRedoService, false);

[x] src/vs/workbench/browser/parts/banner/bannerPart.ts
269, 1: registerSingleton(IBannerService, BannerPart, false);

[x] src/vs/workbench/browser/parts/editor/editorPart.ts
1196, 1: registerSingleton(IEditorGroupsService, EditorPart, false);
1197, 1: registerSingleton(IEditorDropService, EditorDropService, false);

[ ] src/vs/workbench/browser/parts/paneCompositePart.ts
162, 1: registerSingleton(IPaneCompositePartService, PaneCompositeParts, false);

[x] src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
621, 1: registerSingleton(IStatusbarService, StatusbarPart, false);

[ ] src/vs/workbench/browser/parts/views/viewsService.ts
651, 1: registerSingleton(IViewsService, ViewsService, false /* Eager because of the cyclic dependency when registering PaneComposites (Panel that is active) in its constructor:

[ ] src/vs/workbench/contrib/audioCues/browser/audioCues.contribution.ts
18, 1: registerSingleton(IAudioCueService, AudioCueService, false);

[ ] src/vs/workbench/contrib/comments/browser/comments.contribution.ts
41, 1: registerSingleton(ICommentService, CommentService, false);

[ ] src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.ts
19, 1: registerSingleton(ICustomEditorService, CustomEditorService, false);

[ ] src/vs/workbench/contrib/editSessions/browser/editSessions.contribution.ts
57, 1: registerSingleton(IEditSessionsLogService, EditSessionsLogService, false);
58, 1: registerSingleton(IEditSessionsStorageService, EditSessionsWorkbenchService, false);

[ ] src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
83, 1: registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService, false);
85, 1: registerSingleton(IExtensionRecommendationsService, ExtensionRecommendationsService, false);

[ ] src/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.ts
12, 1: registerSingleton(IExternalUriOpenerService, ExternalUriOpenerService, false);

[ ] src/vs/workbench/contrib/interactive/browser/interactive.contribution.ts
324, 1: registerSingleton(IInteractiveHistoryService, InteractiveHistoryService, false);
325, 1: registerSingleton(IInteractiveDocumentService, InteractiveDocumentService, false);

[ ] src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts
700, 1: registerSingleton(INotebookService, NotebookService, false);
701, 1: registerSingleton(INotebookEditorWorkerService, NotebookEditorWorkerServiceImpl, false);

[ ] src/vs/workbench/contrib/scm/browser/scm.contribution.ts
386, 1: registerSingleton(ISCMService, SCMService, false);
387, 1: registerSingleton(ISCMViewService, SCMViewService, false);

[x] src/vs/workbench/contrib/splash/browser/splash.contribution.ts
14, 1: registerSingleton(ISplashStorageService, class SplashStorageService implements ISplashStorageService {

[ ] src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts
719, 1: registerSingleton(IWalkthroughsService, WalkthroughsService, false);

[ ] src/vs/workbench/services/assignment/common/assignmentService.ts
134, 1: registerSingleton(IWorkbenchAssignmentService, WorkbenchAssignmentService, false);

[ ] src/vs/workbench/services/authentication/browser/authenticationService.ts
738, 1: registerSingleton(IAuthenticationService, AuthenticationService, false);

[ ] src/vs/workbench/services/editor/browser/editorResolverService.ts
832, 1: registerSingleton(IEditorResolverService, EditorResolverService, false);

[x] src/vs/workbench/services/editor/browser/editorService.ts
1056, 1: registerSingleton(IEditorService, EditorService, false);

[x] src/vs/workbench/services/environment/electron-sandbox/shellEnvironmentService.ts
29, 1: registerSingleton(IShellEnvironmentService, ShellEnvironmentService, false);

[ ] src/vs/workbench/services/extensionManagement/browser/extensionUrlTrustService.ts
18, 1: registerSingleton(IExtensionUrlTrustService, ExtensionUrlTrustService, false);

[ ] src/vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementService.ts
56, 1: registerSingleton(IWorkbenchExtensionManagementService, ExtensionManagementService, false);

[ ] src/vs/workbench/services/extensions/browser/extensionService.ts
281, 1: registerSingleton(IExtensionService, ExtensionService, false);

[ ] src/vs/workbench/services/extensions/browser/extensionUrlHandler.ts
385, 1: registerSingleton(IExtensionUrlHandler, ExtensionUrlHandler, false);

[ ] src/vs/workbench/services/extensions/electron-sandbox/sandboxExtensionService.ts
22, 1: registerSingleton(IExtensionService, SandboxExtensionService, false);

[x] src/vs/workbench/services/files/browser/elevatedFileService.ts
28, 1: registerSingleton(IElevatedFileService, BrowserElevatedFileService, false);

[x] src/vs/workbench/services/files/electron-sandbox/elevatedFileService.ts
52, 1: registerSingleton(IElevatedFileService, NativeElevatedFileService, false);

[x] src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.ts
219, 1: registerSingleton(IFilesConfigurationService, FilesConfigurationService, false);

[x] src/vs/workbench/services/history/browser/historyService.ts
1110, 1: registerSingleton(IHistoryService, HistoryService, false);

[ ] src/vs/workbench/services/keybinding/browser/keybindingService.ts
925, 1: registerSingleton(IKeybindingService, WorkbenchKeybindingService, false);

[ ] src/vs/workbench/services/language/common/languageService.ts
257, 1: registerSingleton(ILanguageService, WorkbenchLanguageService, false);

[ ] src/vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl.ts
357, 1: registerSingleton(ILanguageDetectionService, LanguageDetectionService, false);

[x] src/vs/workbench/services/lifecycle/browser/lifecycleService.ts
204, 1: registerSingleton(ILifecycleService, BrowserLifecycleService, false);

[x] src/vs/workbench/services/lifecycle/electron-sandbox/lifecycleService.ts
195, 1: registerSingleton(ILifecycleService, NativeLifecycleService, false);

[ ] src/vs/workbench/services/telemetry/browser/telemetryService.ts
111, 1: registerSingleton(ITelemetryService, TelemetryService, false);

[ ] src/vs/workbench/services/telemetry/electron-sandbox/telemetryService.ts
87, 1: registerSingleton(ITelemetryService, TelemetryService, false);

[ ] src/vs/workbench/services/textMate/browser/browserTextMateService.ts
21, 1: registerSingleton(ITextMateService, TextMateService, false);

[ ] src/vs/workbench/services/textMate/browser/nativeTextMateService.ts
262, 1: registerSingleton(ITextMateService, TextMateService, false);

[x] src/vs/workbench/services/textfile/browser/browserTextFileService.ts
69, 1: registerSingleton(ITextFileService, BrowserTextFileService, false);

[x] src/vs/workbench/services/textfile/common/textEditorService.ts
269, 1: registerSingleton(ITextEditorService, TextEditorService, false /* do not change: https://github.com/microsoft/vscode/issues/137675 */);

[x] src/vs/workbench/services/textfile/electron-sandbox/nativeTextFileService.ts
125, 1: registerSingleton(ITextFileService, NativeTextFileService, false);

[ ] src/vs/workbench/services/themes/browser/workbenchThemeService.ts
866, 1: registerSingleton(IWorkbenchThemeService, WorkbenchThemeService, false);

[x] src/vs/workbench/services/timer/electron-sandbox/timerService.ts
88, 1: registerSingleton(ITimerService, TimerService, false);

[x] src/vs/workbench/services/title/electron-sandbox/titleService.ts
10, 1: registerSingleton(ITitleService, TitlebarPart, false);

[ ] src/vs/workbench/services/tunnel/electron-sandbox/tunnelService.ts
108, 1: registerSingleton(ITunnelService, TunnelService, false);

[x] src/vs/workbench/services/untitled/common/untitledTextEditorService.ts

[ ] src/vs/workbench/services/update/browser/updateService.ts
99, 1: registerSingleton(IUpdateService, BrowserUpdateService, false);

[ ] src/vs/workbench/services/url/electron-sandbox/urlService.ts
76, 1: registerSingleton(IURLService, RelayURLService, false);

[ ] src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.ts
135, 1: registerSingleton(IUserDataProfileManagementService, UserDataProfileManagementService, false);

[ ] src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts
822, 1: registerSingleton(IUserDataSyncWorkbenchService, UserDataSyncWorkbenchService, false);

[ ] src/vs/workbench/services/userDataSync/electron-sandbox/userDataSyncAccountService.ts
47, 1: registerSingleton(IUserDataSyncAccountService, UserDataSyncAccountService, false);

[ ] src/vs/workbench/services/views/browser/treeViewsService.ts
14, 1: registerSingleton(ITreeViewsService, TreeviewsService, false);

[x] src/vs/workbench/services/workingCopy/browser/workingCopyBackupService.ts
32, 1: registerSingleton(IWorkingCopyBackupService, BrowserWorkingCopyBackupService, false);

[x] src/vs/workbench/services/workingCopy/common/workingCopyEditorService.ts
100, 1: registerSingleton(IWorkingCopyEditorService, WorkingCopyEditorService, false);

[x] src/vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupService.ts
42, 1: registerSingleton(IWorkingCopyBackupService, NativeWorkingCopyBackupService, false);

[ ] src/vs/workbench/services/workspaces/common/workspaceTrust.ts
890, 1: registerSingleton(IWorkspaceTrustRequestService, WorkspaceTrustRequestService, false);

[ ] src/vs/workbench/workbench.common.main.ts
138, 1: registerSingleton(IEditorWorkerService, EditorWorkerService, false);
141, 1: registerSingleton(IContextKeyService, ContextKeyService, false);

[x] src/vs/workbench/workbench.web.main.ts
96, 1: registerSingleton(IContextMenuService, ContextMenuService, false);
103, 1: registerSingleton(IUserDataAutoSyncService, UserDataAutoSyncService, false);
104, 1: registerSingleton(ITitleService, TitlebarPart, false);
106, 1: registerSingleton(ITimerService, TimerService, false);

@sandy081 starting with you because many of your services show as eager

@jrieken adopted those service I own

@bpasero you are next :-)

Also did https://github.com/microsoft/vscode/pull/159972 which forces every remote service (i.e. a service that talks to the main process or shared process) to be lazy. All of these services did already declare laziness but now its just enabled by default.

would be nice to somehow signal back that service cannot be lazy so that we know which ones are not acknowledged (I guess that is the purpose of this issue but might be nicer to validate in code)

I like - I'll add another falsy value like "eager" or so

https://github.com/microsoft/vscode/pull/160061

would be nice to somehow signal back that service cannot be lazy so that we know which ones are not acknowledged (I guess that is the purpose of this issue but might be nicer to validate in code)

This would be useful for revisiting.

@bpasero @sandy081 You can now use InstantiationType.Eager to mark a service as purposefully eager

@jrieken I think another set of lazy services to look at is those that do not use registerSingleton but just SyncDescriptor:

sharedProcessMain
app.ts
main.ts
cliProcessMain.ts

I assume setting a SyncDescriptor to lazy, has the same effect?
//cc @sandy081 since many services are extension related, especially in the non-workbench-window processes.

I assume setting a SyncDescriptor to lazy, has the same effect?

Yeah, it is the same

https://github.com/microsoft/vscode/pull/160188 does quite a few, even those that I do not consider owning.

Went through all services I own in all processes and adopted.

@jrieken my change in https://github.com/microsoft/vscode/pull/160188 results in exceptions:
ERR [uncaught exception in main]: Event not found: onDidFocusWindow: Error: Event not found: onDidFocusWindow
    at Object.listen (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/parts/ipc/common/ipc.js:799:27)
    at ChannelServer.onEventListen (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/parts/ipc/common/ipc.js:281:35)
    at ChannelServer.onRawMessage (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/parts/ipc/common/ipc.js:229:33)
    at /Users/bpasero/Development/Microsoft/vscode/out/vs/base/parts/ipc/common/ipc.js:177:73
    at Listener.invoke (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:457:27)
    at PrivateEventDeliveryQueue.deliver (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:627:38)
    at Emitter.fire (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:592:37)
    at /Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:69:93
    at Listener.invoke (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:457:27)
    at PrivateEventDeliveryQueue.deliver (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:627:38)
    at Emitter.fire (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:592:37)
    at /Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:82:106
    at Listener.invoke (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:457:27)
    at PrivateEventDeliveryQueue.deliver (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:627:38)
    at Emitter.fire (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:592:37)
    at fn (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/common/event.js:276:44)
    at IpcMainImpl.wrappedListener (/Users/bpasero/Development/Microsoft/vscode/out/vs/base/parts/ipc/electron-main/ipcMain.js:25:21)
    at IpcMainImpl.emit (node:events:526:28)
    at EventEmitter.<anonymous> (node:electron/js2c/browser_init:161:11014)
    at EventEmitter.emit (node:events:526:28)

I wonder if we hit a case where lazy instantiation does not work well with a proxy when there is another proxy involved, because for some of the main-side services we use a utility to expose the service to another process:
https://github.com/microsoft/vscode/blob/c2cc481940d538a41c311411484ffc909b8054b8/src/vs/code/electron-main/app.ts#L786-L787
I think given this I will have to go back to eager instantiation for those services that are remote accessible. Likely an issue because I am enumerating the properties here:
https://github.com/microsoft/vscode/blob/c2cc481940d538a41c311411484ffc909b8054b8/src/vs/base/parts/ipc/common/ipc.ts#L1043-L1048

Right, this seems to be because of double usage of proxies. Because, those services on shared process which I made lazy and support channels seem to work as I do not use ProxyChannel util.

Makes sense to keep them eager. I also believe that a proxy of a proxy doesn't help in perf.

Not 100% sure I can workaround this by doing this at a later stage when the lazy service is actually instantiated...

At the end this might be a bug with the delay-proxy as it likely doesn't react to APIs that's called on it to fullfill the for-in contract

Adding following to the list of SyncDescriptor usage

serverServices
remoteExtensionHostAgentCli

Yeah it will not change much in perf, will review more carefully again tomorrow, for now I revert to unblock insiders: https://github.com/microsoft/vscode/pull/160202

Ok, second attempt: https://github.com/microsoft/vscode/pull/160273
(its quite tricky to know whether a service is proxied or not, you have to do a fulltext search ala fromService.*<name of service>)

Adding @TylerLeonhardt and @lramos15 for your services

I don't believe my services can be lazy. The resolver is definitely needed immediately at startup especially if you're opening something from the code-cli. If the telemetry service is lazy we also miss recording any startup events. Feel free to correct me if I'm wrong as I am not super familiar with how lazy instantiation works

If the telemetry service is lazy we also miss recording any startup events.

Only if the telemetry service logs messages by itself, e.g without any external consumer calling publicLog on it. As soon as a consumer starts to use the service it is being created and things works

The WorkbenchThemeService should stay eager as the constructor restores the last used colors from storage. This needs to happen as quickly as possible for a flicker free startup experience.

The WorkbenchThemeService should stay eager as the constructor restores the last used colors from storage. This needs to happen as quickly as possible for a flicker free startup experience.

@aeschli That makes sense but please "document" this via [InstantiationType.Eager](https://github.com/microsoft/vscode/blob/fb7039f716639f2cb8ad3e0bc449973ab738c549/src/vs/platform/instantiation/common/extensions.ts#L22)

Thanks everyone!


Added support for git describe --always

Allows git describe returning git commit hash when there are no tags
matching requirements.

This will let us add Always="True" to the GitDescribe task, adding --always to the git describe command. It also handles cases where git describe returns only commit hash when there is no tag to use.


add logging to the ackhandler

Codecov Report

Merging #1345 into master will decrease coverage by 0.16%.
The diff coverage is 65%.

@@            Coverage Diff             @@
##           master    #1345      +/-   ##
==========================================
- Coverage   90.53%   90.37%   -0.16%
==========================================
  Files         119      119
  Lines        8248     8279      +31
==========================================
+ Hits         7467     7482      +15
- Misses        518      529      +11
- Partials      263      268       +5

Impacted Files
Coverage Δ

session.go
78.24% <100%> (ø)
:arrow_up:

internal/ackhandler/sent_packet_handler.go
85.42% <47.37%> (-2.4%)
:arrow_down:

internal/ackhandler/received_packet_handler.go
92.94% <77.78%> (-4.2%)
:arrow_down:

internal/ackhandler/received_packet_history.go
96.67% <0%> (-3.33%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a58cfd6...fcbed74. Read the comment docs.