ObjectIntMap.get() causes ArrayIndexOutOfBoundsException in rare cases

java.lang.ArrayIndexOutOfBoundsException: length=0; index=8
at java.lang.String.equals(String.java:662)
at com.badlogic.gdx.utils.ObjectIntMap.get(UniWar:281)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchAttributeLocation(UniWar:287)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.disableVertexAttribute(UniWar:714)
at com.badlogic.gdx.graphics.glutils.VertexArray.unbind(UniWar:157)
at com.badlogic.gdx.graphics.Mesh.unbind(UniWar:398)
at com.badlogic.gdx.graphics.Mesh.unbind(UniWar:389)
at com.badlogic.gdx.graphics.Mesh.render(UniWar:501)
at com.badlogic.gdx.graphics.Mesh.render(UniWar:449)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.flush(UniWar:971)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.switchTexture(UniWar:1050)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.draw(UniWar:364)

https://github.com/libgdx/libgdx/wiki/More-Info

@JavaNoobsyBoobsy
Just to be sure, are you changing the map in multi-threading?
Unless otherwise stated in the javadoc, all libgdx collections are not thread-safe.

We are not modifying this map and not changing any mesh, nor any shader. That's why I reported the error as I imagine that it could be an implementation issue in the class ObjectIntMap itself. I am not sure what triggers the issue and that would be the interesting point to understand:

The code below reproduce the issue. (we don't use ObjectIntMap in our code). Anyway, I don't think that this issue is very important... You can close it if you want.
public static void main(String[] args) {
ObjectIntMap o = new ObjectIntMap(1);
o.resize(0);
o.get("A", 5);
}

This happened 2/6/2016 9:38:18 on Android device: Lenovo sisleyr	Lenovo S90-A, resolution:720x1280, OS:5.0.2. Here is the full stack trace for completeness and to eliminate the possibility that it is a multi-threaded issue (the app has a single thread design): "java.lang.ArrayIndexOutOfBoundsException: length=0; index=8
at java.lang.String.equals(String.java:662)
at com.badlogic.gdx.utils.ObjectIntMap.get(ObjectIntMap.java:281)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.fetchAttributeLocation(ShaderProgram.java:287)
at com.badlogic.gdx.graphics.glutils.ShaderProgram.disableVertexAttribute(ShaderProgram.java:714)
at com.badlogic.gdx.graphics.glutils.VertexArray.unbind(VertexArray.java:157)
at com.badlogic.gdx.graphics.Mesh.unbind(Mesh.java:398)
at com.badlogic.gdx.graphics.Mesh.unbind(Mesh.java:389)
at com.badlogic.gdx.graphics.Mesh.render(Mesh.java:501)
at com.badlogic.gdx.graphics.Mesh.render(Mesh.java:449)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.flush(SpriteBatch.java:971)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.switchTexture(SpriteBatch.java:1050)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.draw(SpriteBatch.java:364)
at jg.Graphics.drawRegion(Graphics.java:289)
at jg.Graphics.drawRegion(Graphics.java:243)
at tbs.graphics.Gob.paint(Gob.java:511)
at tbs.graphics.AnimSet.paintFrame(AnimSet.java:631)
at tbs.graphics.AnimPlayer.paint(AnimPlayer.java:963)
at tbs.graphics.AnimPlayer.paint(AnimPlayer.java:977)
at uniwar.game.ui.GamePainter.paintAnim(GamePainter.java:127)
at uniwar.game.ui.BaseAnimPlayers.paintBase(BaseAnimPlayers.java:187)
at uniwar.game.ui.GamePainter.paintBase(GamePainter.java:414)
at uniwar.game.ui.GamePainter.paintBases(GamePainter.java:400)
at uniwar.game.ui.GamePainter.access$100(GamePainter.java:46)
at uniwar.game.ui.GamePainter.access$400(GamePainter.java:46)
at uniwar.game.ui.GamePainter.access$600(GamePainter.java:46)
at uniwar.game.ui.GamePainter.access$700(GamePainter.java:46)
at uniwar.game.ui.GamePainter$UnitsAndBasesAndCursorPainter.paintHex(GamePainter.java:473)
at uniwar.game.ui.GamePainter.paintAllHexes(GamePainter.java:611)
at uniwar.game.ui.GamePainter.paintBattleField(GamePainter.java:168)
at uniwar.game.model.Game.paint(Game.java:736)
at uniwar.scene.ingame.InGameScene.paintGame(InGameScene.java:94)
at uniwar.scene.ingame.InGameScene.paint(InGameScene.java:106)
at tbs.scene.Stage.draw(Stage.java:740)
at tbs.scene.SceneCanvas.paintGameView(SceneCanvas.java:88)
at uniwar.UniWarCanvas.paintGameView(UniWarCanvas.java:518)
at jg.Canvas.render(Canvas.java:497)
at uniwar.UniWarGame.render(UniWarGame.java:50)
at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:472)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)"

public static void main(String[] args) {
ObjectIntMap o = new ObjectIntMap(1);
o.resize(0);
o.get("A", 5);
}

How can you call resize when it is an internal private method? Also, I don't believe that 0 is a legal argument to resize even if you do manage to call it.

These are two different errors, one throws out of bounds at String#equals (the error from the stacktrace you supplied), the other is due to invalid resizing of the ObjectIntMap (your example code)
Looks like this is an Android issue, probably due to some charset encoding.

I was completely wrong. I apologize for wasting your time on this. I will be much more carefully in reporting errors next time. I called the private resize(0) method after I decompiled the class and added a main() method to it to see how that exception could be reproduced. I didn't even notice that the real problem came from String.equals(). That device specific error is probably not worth investigating.


The git repository is missing the v0.9.0 tag

Before I start let me thank you for maintaining fmt. Just as a lot of other OCaml developers, I use it quite extensively!
fmt.0.9.0 has been released but it seems the corresponding git tag was not pushed either here or upstream at https://erratique.ch/repos/fmt.git. Could you please push the tag or eventually let me know the hash of the commit used to produce the release tarball?
To give you a bit of context, the reason why I'm asking for this is because we maintain dune ports of opam packages at https://github.com/dune-universe/opam-overlays to make them compatible with opam-monorepo. We want to make sure the dune ports are as close as possible to released version they correspond to.
Please let me know if I can help in any way with this.

Indeed I often forget to push the last commit and/or tag in my repos after a release. This should be good now.


Auto Release management

[ ] https://github.com/googleapis/release-please

Ref:

https://www.npmjs.com/package/semantic-release


Found 'circle' as layer type but only 'symbol' is supported

Is there any chance to support also simple circle layers?
Thanks a lot for your work!

This is not possible as the spiderfied markers use icon-offset to position the markers around the cluster. This is no such thing as circle-offset sadly.
I could try to use icon layer with markers that look like circles instead like in the demo.
With renderMethod option "3D" it could be supported in the future as the markers around the cluster are positioned with coordinates instead of icon-offset. This method isn't perfect either though, especially if you start rotating the map.


Issues with watch-client

[0] /Users/bortignon/dev/TracklistMeReact-OverBoilerPlate/webpack/dev.config.js:24
[0] var babelLoaderQuery = Object.assign({}, babelrcObject, babelrcObjectDevelopme
[0]                               ^
[0] TypeError: undefined is not a function
[0]     at Object. (/Users/bortignon/dev/TracklistMeReact-OverBoilerPlate/webpack/dev.config.js:24:31)
[0]     at Module._compile (module.js:460:26)
[0]     at Object.Module._extensions..js (module.js:478:10)
[0]     at Module.load (module.js:355:32)
[0]     at Function.Module._load (module.js:310:12)
[0]     at Module.require (module.js:365:17)
[0]     at require (module.js:384:17)
[0]     at Object. (/Users/bortignon/dev/TracklistMeReact-OverBoilerPlate/webpack/webpack-dev-server.js:5:21)
[0]     at Module._compile (module.js:460:26)
[0]     at Object.Module._extensions..js (module.js:478:10)
[0] npm run watch-client exited with code 0
--> Sending SIGTERM to other processes..
Possible hint:
I recently downgrade from node 0.4.21 to 0.12.7

I am not sure we support 0.12. I know I can get my project to build on it, but I haven't tested with watch-client.

Yeah, I think we've moved on to 4.x.

I am getting this frequently with node 5.6.0

I'm getting this trying to run postgres and node on an aws nano instance (512mb memory). After starting node the machine is pretty choked for memory with only 6mb free:
[ec2-user@ip-172-31-53-72 ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:           491        484          6          6          0         21

This warning on startup may be relevant:
[1] Warning: connect.session() MemoryStore is not
[1] designed for a production environment, as it will leak
[1] memory, and will not scale past a single process.

but I suspect it's just a general process memory issue


[PA-662] Modify GetPxBackupNamespace to detect PxBackup namespace

What this PR does / why we need it:
This PR fixes an issue in the Px-Backup automation where it was previously limited to working only in the "px-backup" namespace. With this PR, the automation can now be executed in any namespace, making it more flexible and adaptable to different deployment scenarios.
Which issue(s) this PR fixes (optional)
Closes #PA-662
Special notes for your reviewer:
Please review the Jenkins build for the "BasicBackupCreation" test case with px-backup namespace "px-backup" using the link below [PASSED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/105/
Please review the Jenkins build for the "BasicBackupCreation" test case with px-backup namespace "central" using the link below [PASSED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/108/
Please review the Jenkins build for the "BasicBackupCreation" test case with no px-backup using the link below [FAILED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/107

Please review the latest Jenkins build for the "BasicBackupCreation" test case with px-backup namespace "px-backup" using the link below [PASSED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/134/
Please review the latest Jenkins build for the "BasicBackupCreation" test case with px-backup namespace "central" using the link below [PASSED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/136/
Please review the latest Jenkins build for the "BasicBackupCreation" test case with no px-backup using the link below [FAILED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/135/

Final test build after merging
Please review the latest Jenkins build for the "BasicBackupCreation" test case with px-backup namespace "px-backup" using the link below [PASSED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/146/
Please review the latest Jenkins build for the "BasicBackupCreation" test case with px-backup namespace "central" using the link below [PASSED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/145/
Please review the latest Jenkins build for the "BasicBackupCreation" test case with no px-backup using the link below [FAILED]
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Sumit/job/Custom-Pipelines/job/px-backup-on-demand-system-test-byoc/144/


Search does not appear to handle wildcard properly

I have noticed a number of odd behaviors in the search api including returning results that do not match the search string.  Let's focus on an individual case: I am able to find an object when its name is fully spelled out, but not when there is a wildcard that appears to me should match. Thanks.
search = client.discovery.search_entities("demoinput01") (finds it)
search = client.discovery.search_entities("demoinput0*") (returns zero results)

Hi, @MarkCKnutson  - Thank you for using PyApacheAtlas!  It looks like the Purview product recently changed their search service.
https://docs.microsoft.com/en-us/azure/purview/how-to-search-catalog#search-query-syntax
I agree, the wildcard does not function the way I would have expected.  I can replicate the issue on my Purview instance.
Not to pass the buck, but this is an Azure Purview service issue and not an issue with PyApacheAtlas.  You might try exploring the new advanced query syntax and see if you can construct a query that fits your need.

Thankyou for your prompt response. I noted other search issues and I agree the are not caused  by the pyapacheatlas wrapper on the api calls, so closing as resolved.


Adding info on multi-column inverted indexes.

Fixes #9103.

This feature flag and note should not be added to the docs. The feature flag was removed before 21.1 was released. It was never in a production release and multi-column inverted indexes were never "experimental" in a production release. They went from being unsupported in 20.2 to fully supported in 21.1. I should have made this more clear in the release note (or omitted a release note altogether). Sorry for causing unnecessary work.

No worries. Updated the v21.1 topic to remove the warning & feature flag.


Update developer-setup.md

For Archlinux user, best is to use the mattermost package from AUR

Thanks @gabx! Queuing for review

Actually, wondering if anyone in the community who uses Archlinux would be able to help with review?

I am using Archlinux and Fedora. What can I do for you?

Closing this PR as it is taken over by https://github.com/mattermost/docs/pull/685


not working with wide screen

I got a 5120x1440 Widescreen Monitor. I want it to work with a Window which is 2560x1440 on the right half of the screen.
Whatever I set, it just does not work. Expecially it somehow resets the Source Crop Filter to width 0 height 0 always. No Idea why.

hello? anyone there ?

Duplicate of #90. Closing.


Weight Initializer

This PR is resubmit of #820. I took over @EdwardRaff 's work of the previous PR.

I have one unsatisfactory point in the location of init_weight.
I would like to put this function to initializer.py because I think it is most appropriate location. But it is impossible because of cyclic import. As a workaround, I put init_weight in initializers/__init__.py  and we have to access this function as initializers.init_weight. I think it is confusing because by its name, users expect that initializers module has concrete instances of Initializer class.

Please use double quotes for docstrings.

It looks great for me except a comment!


Good fit for an attempt at 1 codebase mobile native AND webapp ?

Sorry if too generic, but I have two questions regarding the possibility of most code reuse possible between mobile apps AND web.

Is there known impossibilities (apart from phone hardware related of course) to share view's code between web and phone apps?

Is this even a supported use case from the platform ?

Thank you.

@fabm22 check out  angular-seed-advanced repository demonstrating technique to share code base within web and NativeScript

Hey @fabm22 you can check this blog post on the matter:
Code Sharing Between Web and Mobile with Angular and NativeScript


Add inert attribute

Summary
When inert lands in Firefox 104, it'll officially be supported by all major browsers (reference: caniuse). It's not popular with authors yet, except for a11y nerds, but I reckon we can get ahead of the curve.
Also, we now extract repeated selectors into their own variables. This allows the array of selectors to be minified in ways that string literals can't. For example, if this goes into a minifier:
`a[href]${notInertNegativeTabindex}`,

something like this will come out:
`a[href]${e}`,

We'll shave bytes off of build sizes! Bytes!

Funny thing, the library did support inert but it was removed in version 0.3.0 because back then the support was not great. I’m glad we bring it back now that the support has matured.
One question though (and this is where my knowledge of inert is failing me and might have been why I removed that in the first place): isn’t inert supposed to be placed on a top-level container and not in fact on all interactive elements themselves? Which means these elements are unlikely to actually have the inert attribute, but will be inert by virtue of being the descendant of an inert container. Which would imply these selectors won’t ever match actually. Or did I miss something?
Unrelated comment: using JavaScript this way makes it harder for people to a) read the code (arguable) and b) copy and paste the array into their own project if they don’t want to use a library. Maybe not a huge deal but worth thinking about it?

isn’t inert supposed to be placed on a top-level container and not in fact on all interactive elements themselves?

As far as I know, this is the way an author is most likely to use inert, but an author may still choose to mark an individual element as inert for any reason. MDN’s examples have the author placing inert directly on a button, for example. I think this is a low-risk addition to the selector, because it doesn’t meaningfully increase the cost of querying the DOM. We’d need a much more complex selector for that, I think.

using JavaScript this way makes it harder for people to a) read the code (arguable) and b) copy and paste the array into their own project if they don’t want to use a library

I take your point about readability, although I think es6 template literals are decently common these days. As for the ability to copy/paste: isn’t this just as copyable as before as long as the author also copies the new variables at the top of the file?

Alright on both points. :)


Need Consistent Layout Representations During Transpile

There are a few bug reports recently with how Layout is applied. The source of confusion is that different passes do slightly different thigns with the layout.
After internal discussions with @itoko @kdk @1ucian0, here is the plan:

[ ] Clean up the ApplyLayout pass (#2050) and merge it. This pass should be dumb, and just consume a virtual circuit + Layout object, and output a register-less circuit (for now, a flat register). This involves updating the dag nodes as well as they contain register pointers. @itoko

[ ] Change BasicSwap and StochasticSwap to consume physical circuits (register-less where each index literally corresponds to the physical qubit). @1ucian0

[ ] Change LookaheadSwap to remove the logic for flattening register. @kdk

[ ] Remove LegacySwap and replace by StochasticSwap (after some more testing). @ajavadia

[ ] Update the other passes that currently consume a Layout (e.g. CXDirection, CXCheck, ..) to just assume that the layout has been applied, so just consult the (physical) circuit. @ajavadia

[ ] Add a circuit.layout property, so that the selected layout can be queried by the user later. This property will be populated by the layout selection pass (NoiseAdaptiveLayout, DenseLayout, TrivialLayout, SetLayout). So then, remove this from pass_manager.property_set. @1ucian0

Fixing these should close  #1831, #2066, #2405, #2503, #2532.

BasicSwap PR #2590

While changing BasicSwap and StochasticSwap, shall they raise if the coupling map is bigger than the size of the physical circuit?

Add a circuit.layout property, so that the selected layout can be queried by the user later. This property will be populated by the layout selection pass (NoiseAdaptiveLayout, DenseLayout, TrivialLayout, SetLayout). So then, remove this from pass_manager.property_set.

Currently, passes modify DAGs, not circuits (right now, they are not the same). Layout selection passes are AnalysisPass, should they be TransformationPass?

@1ucian0 if we are moving towards circuits having metadata, then I'm not sure there's still a need for PassManager.property_set. The Analysis passes can just update the circuit metadata, while the Transformation passes update the circuit data. (Two circuits can be equivalent even if they differ in their metadata).

Hhmm... let's leave that one for later. I think there is a risk of overpopulating the circuit attributes.


documentation mismatch

The Rule.create_filter is looking for == when doing a PropertyIsEqualTo comparitor. However, the documentation states that = is acceptable.
This had me looking around for a while. :(

@rumski20 Thanks! Will fix.

@kshepard This is fixed in #19, and can be closed.


Introduce a soft token section and add WearAuthn

Introduces a section for soft tokens, which fit neither into the existing hardware nor the client lib section. Damian Czaja's android-webauthn-token is an example of such a soft token, this PR moves it into this new section.
It also adds WearAuthn to the list of soft tokens, which I developed to provide a full-fledged open-source implementation of the CTAP2 standard in a higher programming language (Kotlin/Java). It uses the watch's screen to show confirmation prompts and supports the on-device selection of resident credentials.

Thanks @FabianHenneke


"unexpected "error": '8:1: 8:33: multiple matching crates for deny_public_fields [E0464]'" after Cargo update

Servo’s CI failed after updating Cargo: https://github.com/servo/servo/pull/16601#issuecomment-297000204
CC @nox
I suspect that the issue is using -L path/to/directory whereas Cargo uses --extern name=path/to/file.rlib. I tried to reproduce outside of Servo but failed.
Attempted steps:

rustup update nightly
rustup update nightly-2017-04-21
Use this branch https://github.com/laumann/compiletest-rs/compare/master...SimonSapin:dep
cd test-project
cargo +nightly test
cargo +nightly-2017-04-21 test

I'm not sure what to do about this. If the issue is using --extern instead of -L then maybe https://github.com/servo/servo/blob/234951e4b6d66891cd0cc9705f42e3ca16d9e3d5/tests/compiletest/helper/lib.rs#L26 needs changing.
But if there are multiple matching crates, does that mean that Cargo started adding dependencies that weren't added before? Maybe the dependencies added with config.target_rustcflags is obsolete?

I filed this in case you had another idea, but unfortunately I believe there isn’t much to do as long as compiletest-rs works by calling rustc. To properly work with Cargo’s dependency management it should generate Cargo.toml files and call cargo instead, but that’s beyond a mere bugfix and almost sounds like a rewrite.


Installable Standalone CLI

As a Cloudsmith user, I would like to have an CLI application for interacting with Cloudsmith that doesn't require python. This would make it easier for me to install and update the CLI app without worrying about the version or configuration of Python. Particularly on Windows machines, where Python isn't installed by default.
This would also make it easier to add the CLI to various package managers for simpler installs and hopefully improve adoption.
If it's implemented in Go, the application could take advantage of cobra and viper for a cohesive CLI experience that handles shell completion, in-console help, and compositional values from configuration, environment, and flags/arguments. With the charm libraries, the CLI could also surface a more delightful UX that makes it easier to use.

Hey Michael,
Interesting ideas here, which you've obviously put a lot of thought into.
We have discussed similar ideas internally before.
While the current solution has its pros and cons, it is actively in use by a lot of folks and serving a purpose in its current form. So we'd need to gauge demand carefully before thinking about embarking on a wholesale shift.
Let's keep the issue open so that folks can +/-1 and we can get a feel for what demand is out there.

Thank you! Greatly appreciated. 😊


Crash after mount & data loss & nothing

Technical data
WinSshFS

[x] stable
[ ] prerelease
[ ] custom build
Version: <IP_ADDRESS>

Dokan driver

[x] stable
[ ] prerelease
[ ] custom build
Version: Dokany 1.1.0

Enviroment

Windows version: 10 FCU
Architecture: x64
Related software: Windowsc Explorer

Support

Usage: commercial - development
Your personal priority to solve this issue: urgent
Support ability: ?

Probably 3 related issues:

After mounting a folder into a drive, the program crashes as soon as Explorer displays the drive, so that's before even opening it and viewing the contents.
After reopening the program, all my mounts are gone!! How many times do I have to keep reentering all those fields! Argh!
Mounting a remote folder into a directory doesn't seem to work either. It's totally empty, and I'm not getting errors, which leads me to assume the fields entered were correct.

Let's actually call it the age-old problem of silent fails. At least my third point.
If I point it to a completely bogus file for my private key, it acts as if it still happily connects.  I can also happily """"connect"""" if I enter a nonexisting remote directory to connect with.
Why is this program unable to display an error message? How can I ever know what's wrong if acts as if all fields are correct, when they might not be??

Oh wow, even if the local mount folder doesn't exist, it still acts as if nothing is wrong. But in the mean time it connects to absolutely nothing, and mount nothing into nothing. Brilliant!

Just see this: https://github.com/Foreveryone-cz/win-sshfs/issues/163

But should it be so hideously unstable when I've got the latest version of its dependent library?
Could you not just bundle whatever version of Dokan works with your program? I had been fiddling for several hours before giving up, with all kinds of combinations of versions. It shouldn't be so complicated.
Alternatively, why not use OpenSSH Beta, which is now a component in Windows 10?

I feel your pain bro.
https://github.com/dokan-dev/dokany/wiki/Update-Dokan-1.0.0-application-to-Dokany-1.1.0


Mat/Pat - HRSC/Payroll Content Edits

AC

[x]  In Employee Information change "Please confirm your information. You cannot edit this information in the form. If your information is incorrect or missing" to

"Please confirm your information is correct as this is the current information in the employee database - PeopleSoft. If your information is incorrect or missing, please follow the instructions below to correct it as soon as possible as payroll will use the latest information in PeopleSoft when they process your leave to determine your leave allowance. You cannot edit this information in the form. If your information is incorrect or missing, follow the instructions below: "

[x] Maternity leave - General Information
Change "You must start your leave the day you have your baby, even if it is before the expected due date or the date you intended to start your leave" to "If you have your baby before the expected due date or the date you intended to start your leave, you must start your leave on the day you have your baby"

[x] In Parental leave - Start Date, in case of only parental leave,  add the following line under "When was your baby born or placed after adoption?"
"Provide the date your baby was born or placed or the expected due date or placement date"

The three changes have been made in the Dev and push to Test env as well.

Thank you, Chris! The changes look great!
Moving to PO

@chriscaldwell-psa for #3 can it be a description under the question like in "are you a birthing Parent"

@fazil-ey How does it look now?

Working with @Andrew-Vargas-bcgov  to fix the font and spacing. While we are fixing it for "What was your baby born...?, also fixing "How many weeks of leave do you want to take?" for Parental leave and "When do you want to start your leave?" for maternity leave

@fazil-ey moved changes to test. let me know if they look okay.

Looks good, confirmed content changes and the font change in the comment above


Camera - create an example screen to showcase how to use the selected files

Create a screen in Ensemble as follows -

Have a button called "Select Images or Videos"
Under the button, there should be a ListView widget. ListView should show a custom widget that displays either an image or a video.

Actions -

Button should call the openCamera action. Max number of files should be 10. Both images and videos could be created or selected from gallery
Once user takes or selects photos or videos and closes the camera, take the selected images and videos and add them to the ListView
Use the video player if it is a video so I may play the video from the list

User may click on camera many times and select images or videos - all of them should keep getting added to the list view.

@hamxa152 feel free to work with @Moeez1999 on this as he created the ListView widget

https://studio.ensembleui.com/app/e24402cb-75e2-404c-866c-29e6c3dd7992/screen/USuOaOZApSgzE2uVrqlv


Could not sync with existing tensorboard event files

wandb --version && python --version && uname

Weights and Biases version: 0.8.36
Python version: Python 3.7.6
Operating System: MSYS_NT-10.0-18362

Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
I am using Anaconda to manage my Python environment and I installed required dependencies for wandb and also pytorch >1.5.0 and tensorboard = 2.2.1. I followed the instructions to log in and sync using the command line interface, but first it requires me to install tensorflow (according to the documentation it should not be a hard requirement) which I did, but then when I tried to sync, it returns an internal error.
What I Did
wandb sync log_dir

wandb: Syncing log_dir to:
wandb: revived-sun-1 https://app.wandb.ai/username/project_name/runs/2cswv2su
wandb: Found tfevents file, converting...
2020-05-21 00:05:17.302868: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-05-21 00:05:17.310526: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
WARNING:tensorflow:From h:\anaconda3\envs\conda_env_name\lib\site-packages\tensorflow\python\summary\summary_iterator.py:68: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
Traceback (most recent call last):
  File "h:\anaconda3\envs\conda_env_name\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "h:\anaconda3\envs\conda_env_name\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "H:\Anaconda3\envs\conda_env_name\Scripts\wandb.exe\__main__.py", line 7, in <module>
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\wandb\cli.py", line 154, in wrapper
    return func(*args, **kwargs)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\wandb\cli.py", line 447, in sync
    path, run_id=id, project=project, entity=entity, ignore_globs=globs)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\wandb\wandb_run.py", line 339, in from_directory
    summary.update(wbtf.stream_tfevents(path, file_api, run, namespace=namespace))
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\wandb\tensorflow\__init__.py", line 55, in stream_tfevents
    parsed = tf_summary_to_dict(summary, namespace=namespace)
  File "h:\anaconda3\envs\conda_env_name\lib\site-packages\wandb\tensorboard\__init__.py", line 339, in tf_summary_to_dict
    if not wandb.run.config.get(key):
AttributeError: 'NoneType' object has no attribute 'config'

Hi there, thanks for letting us know about this issue. We'd like to fix syncing problems in the new version of our client, and I'll check with my colleague @raubitsj to see if this case is supported.
ccing @raubitsj — we're working on a new beta of the Weights & Biases client that improves support for environments like Windows. Would you be interested in giving it a try?

Join the Slack forum and go to the wandb-cling channel.
Install CLI-NG following directions from the GitHub repo.
Try tracking a model with the new client, no code changes necessary.

Message us in the wandb-cling channel— we’d love to hear any questions or feedback.

I also have this problem. My TensorBoard event files were created with PyTorch. I am on Linux.
Manjaro Linux 20.0.3 Lysia
Python 3.7.7
tensorboard 2.2.2
tensorflow 2.2.0
torch 1.5.0
wandb: Syncing /run/media/user/657fb98a-8515-4d43-87a4-5000a5c733d6/tensorboard/v7 to:
wandb: visionary-hill-4 https://app.wandb.ai/tetamusha/dodonet/runs/21f1zr3n
wandb: Found tfevents file, converting...
WARNING:tensorflow:From /home/user/.anaconda3/lib/python3.7/site-packages/tensorflow/python/summary/summary_iterator.py:68: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.
Instructions for updating:
Use eager execution and:
`tf.data.TFRecordDataset(path)`
Traceback (most recent call last):
  File "/home/user/.anaconda3/bin/wandb", line 8, in <module>
    sys.exit(cli())
  File "/home/user/.anaconda3/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/.anaconda3/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/wandb/cli.py", line 154, in wrapper
    return func(*args, **kwargs)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/wandb/cli.py", line 446, in sync
    path, run_id=id, project=project, entity=entity, ignore_globs=globs)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/wandb/wandb_run.py", line 346, in from_directory
    last_row = wbtf.stream_tfevents(path, file_api, run, step=step, namespace=namespace)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/wandb/tensorflow/__init__.py", line 55, in stream_tfevents
    parsed = tf_summary_to_dict(summary, namespace=namespace)
  File "/home/user/.anaconda3/lib/python3.7/site-packages/wandb/tensorboard/__init__.py", line 343, in tf_summary_to_dict
    if not wandb.run.config.get(key):
AttributeError: 'NoneType' object has no attribute 'config'

@vincentwen1995 maybe the discussion in https://github.com/wandb/client-ng/issues/23#issuecomment-651258932 could clarify some things to you.

Hi @vincentwen1995 I believe this issue is fixed in the latest version of our library, 0.10.0. Could you please try it and reopen the issue if it's still not working?

Hi @vincentwen1995 I believe this issue is fixed in the latest version of our library, 0.10.0. Could you please try it and reopen the issue if it's still not working?

Sure, thank you!

""Could not sync with existing tensorboard event files wandb/client#1051""
Above feature is not yet there,right ?


Repository not found

Hi. When start project python3 -m demo.gradio_animate - have same error -
Repository Not Found for url: https://huggingface.co/pretrained_models/stable-diffusion-v1-5/resolve/main/tokenizer/vocab.json.
Please make sure you specified the correct repo_id and repo_type.
If you are trying to access a private or gated repo, make sure you are authenticated.
How to fix it and start a project!? Thanks

I made a pull request.
There were incomplete paths in one of the files.
#10

We have fixed this error in README, thank you guys.


[Issue] CVE-2023-23397.ps1: "Failure creating EWS auth token, exiting Program."

Describe the issue
Tried to run the script for Exchange Online without success.
C:\Temp\CVE-2023-23397.ps1 -Environment "Online" -DLLPath C:\PS1\Dll\Microsoft.Exchange.WebServices.dll -UserMailboxes<EMAIL_ADDRESS>Script Output
CVE-2023-23397 script version <IP_ADDRESS>5
Prompting user for authentication, please minimize this window if you do not see an authorization prompt as it may be in the background
Waiting 60 seconds for app credentials to register..
Continuing...
Failure creating EWS auth token, exiting Program. Please review the error message below and re-run the program:
Response status code does not indicate success: 404 (Not Found).

Additional context
The script worked correctly the first time via parameter -CreateAzureApplication, infact if I launch again the create application request I get as result that it already exists in my Azure tenant.
C:\Temp\CVE-2023-23397.ps1 -CreateAzureApplication
CVE-2023-23397 script version <IP_ADDRESS>5

Prompting user for authentication, please minimize this window if you do not see an authorization prompt as it may be in the background
Application with name CVE-2023-23397Application already exists...
Client ID: [REDACTED]

Account                      Environment TenantId                             TenantDomain            AccountType
-------                      ----------- --------                             ------------            -----------
<EMAIL_ADDRESS>AzureCloud  [REDACTED] contoso.onmicrosoft.com

I'm using PowerShell 7 with AzureAD installed and executed via -UseWindowsPowerShell parameter.
psversion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      3      3

@gioxx this is a known issue within the AzureAD module. You must run within windows PowerShell, not PowerShell Core.

Thanks @dpaulson45, I'll try it.

Yes, thank you @dpaulson45 as I had the same issue.
One question, I am getting a 403 forbidden which indicates the permissions are not set correctly on the application.  I did not recreate it yet using PS5; @gioxx did you do that?

Yes, thank you @dpaulson45 as I had the same issue.
One question, I am getting a 403 forbidden which indicates the permissions are not set correctly on the application.  I did not recreate it yet using PS5; @gioxx did you do that?

Yes, I have created the application using integrated PowerShell on Windows 10.

Yes, thank you @dpaulson45 as I had the same issue.
One question, I am getting a 403 forbidden which indicates the permissions are not set correctly on the application.  I did not recreate it yet using PS5; @gioxx did you do that?

Yes, I have created the application using integrated PowerShell on Windows 10.

Awesome, it's working now...
Regards,
Mike.

Looks like the initial question was answered. Going to close this issue. Please let us know if there is something else. We can then re-open the issue.


Add support for log4j2.properties and unused parameters become deprecated (daily_rolling_date_pattern , default_logging_level, file_rolling_type, logging_file, logging_level, logging_template, deprecation_logging, deprecation_logging_level, rolling_file_max_backup_index, rolling_file_max_file_size, security_logging_content, security_logging_source)

Pull Request (PR) description

Add indication deprecated parameters (if not used) :  daily_rolling_date_pattern, default_logging_level , file_rolling_type, logging_file, logging_level, logging_template, deprecation_logging, deprecation_logging_level, rolling_file_max_backup_index, rolling_file_max_file_size, security_logging_content, security_logging_source
Suppress template log4j2.properties.erb
Modify manifest config.pp
Add function ruby es_hash2properties

This Pull Request (PR) fixes the following issues

Fixes #529
Fixes #907
Fixes #1056

Replace Opened PR

#1021
#1071

@phaedriel thanks for this PR!
Just to be sure, this should be tagged as a breaking change? Can you reword the PR title so that it "speaks" to end-user when they read the ChangeLog (which use the PR title and link to it for further details)?
Thanks!

Better ?

Thanks!

I have keep unused parameters, just move them on bottom list and add optional if necessary > remove them will be more easy in future release. I have clean unused values in data yaml files.

I saw, and its awesome :heart_eyes:

I'm not sure it's a breaking change ?

I used an old version of the module (ES 6.x, when the module was managing multiple instances) and it seems it managed log4j2.properties. But looking at the changes, it seems it stopped doing so, so that's why I am asking.
If I am right, this in an "enhancement" (it add a new feature: previously in this major branch the file could not be managed and now it can be). But if I update from a previous version (same major version, let's say the latest version 8.0.2), if it will change the content of the file it is a breaking change (I don't think we are in this case). Maybe the user could have some settings in logging_config that where ignored and will be applied again, this is not a breaking change, at most it is an enhancement, and someone can argue it is a bugfix :-)


Webview's BrowserMetrics should be regularly cleaned by K-9

Describe the bug
I noticed that K-9 Mail occupies 800MB of internal storage and decided to check what eats so much space.
Running du -h /data/data/com.fsck.k9 revealed the WebView's BrowserMetrics uncontrollably grows.
The bug itself affects every app using webview, as shown on the following screenshot, however privacy-oriented apps like Bromite do delete the whole folder on exit.
Browser Metrics is a privacy-invasive "feature" anyway that is not used by K-9.
To Reproduce
Steps to reproduce the behavior:

As root, run du -h /data/data/com.fsck.k9
Enjoy the large number of tracking info collected about webpages rendered from your inbox :)

Expected behavior
Such invasive and space-consuming telemetry should be removed regularly to minimize privacy impact
Screenshots

Environment (please complete the following information):

K-9 Mail version: 5.724
Android version: 7
Device: Samsung armv7l
Account type: IMAP

@cketti

Can confirm experiencing the same issue with K-( using more than 1 GB of available storage space such that Google's Play Store would not download or install any apps or updates.  Deleting all the files com.fsk.k9/app_webview/BrowserMetrics resolved the problem (for now!)

Sounds like a platform issue to me. What Android ROMs are you using?

I am using a custom-ROM for Android 9 from User MSe1969 on XDA Developers:
[ROM][Unofficial][9.0.0][signed]LineageOS 16.0 for Osprey
https://forum.xda-developers.com/t/rom-unofficial-9-0-0-signed-lineageos-16-0-for-osprey.4095453/

@AlanTheLinuxGuy we (the group of people maintaining legacy LineageOS including MSE1969) resolved the problem by switching system webview to Bromite. But @cketti please consider adding the code to remove this folder (of if you have no time, let me do it!) because most K-9 users are not so tech-savvy to migrate system webview.

@basilgello  Is the fix in LineageOS or in K-9?  I assume that without a fix in one of these, I will have to keep monitoring the BrowserMetrics folder and deleting the accumulating files.  Thanks for your assistance on this issue.

The fix is neither there nor here yet. Please check https://bromite.org for instruction how to replace system webview with Bromite.

I also had such Webview problems. They have been fixed in LineageOS in the meantime. Installing Webview Beta from Google Play also solved the problem.


Add automation heading level 1 to fix about dialog

Summary of the Pull Request
Add automation heading level 1 to fix the about dialog by adding an automation property.
Allows screen reader to pick up that this is a heading and read properly.
References and Relevant Issues
Fixes #11912
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
PR Checklist

[x] Closes #11912
[ ] Tests added/passed
[ ] Documentation updated

If checked, please file a pull request on our docs repo and link it here: #xxx

[ ] Schema updated (if necessary)

You'll probably need to run the script tools\runxamlformat.cmd to make the CI happy, but if this works, I'\m good with it. Thanks!

I'll format it this week and validate once more :)


Issues using Beast with Raspberry Pi 4

I am working on a project that is meant to be run on a Raspberry Pi 4. I can compile and run the project on my Ubuntu system. However, after adding the websocket part of my project using Beast, I can no longer compile on the Raspberry Pi, or run a cross-compiled binary that I compile on my Ubuntu machine. I will describe the issue that occurs when I try to compile on the Raspberry Pi 4 below.
As for cross-compiling, I have set up a cross compiler mostly following this guide. I am able to cross-compile the project, but after adding the websocket feature, I get this error when running the executable: ./handover_websocket: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ./handover_websocket)
The Pi only has  GLIBCXX_3.4.25 available. Does Beast require 3.4.26, or have I set up something wrong in my cross-compiler?
Version of Beast
306
Steps necessary to reproduce the problem
I am trying to create a callback as follows:
on_connect_callback_ = boost::beast::bind_front_handler(
&WebSocket::on_connect,
shared_from_base());
The method shared_from_base is defined in the parent class of WebSocket as follows:
std::shared_ptr shared_from_base()
{
return std::static_pointer_cast(shared_from_this());
}
The compiling error is the following:
In file included from include/boost/beast/core/bind_handler.hpp:14,
from include/boost/beast/core/async_base.hpp:14,
from include/boost/beast/core.hpp:15,
from src/WebSocketSession.h:12,
from src/WebSocket.h:19,
from src/WebSocket.cpp:13:
include/boost/beast/core/detail/bind_handler.hpp: In instantiation of ‘boost::beast::detail::bind_front_wrapper<Handler, Args>::bind_front_wrapper(Handler_&&, Args_&& ...) [with Handler_ = boost::beast::detail::bind_front_wrapper<void (WebSocket::)(), std::shared_ptr >&; Args_ = {}; Handler = void (WebSocket::)(); Args = {std::shared_ptr}]’:
/usr/include/c++/8/bits/std_function.h:173:6:   required from ‘static void std::_Function_base::_Base_manager<_Functor>::_M_clone(std::_Any_data&, const std::_Any_data&, std::false_type) [with _Functor = boost::beast::detail::bind_front_wrapper<void (WebSocket::)(), std::shared_ptr >; std::false_type = std::integral_constant<bool, false>]’
/usr/include/c++/8/bits/std_function.h:208:16:   required from ‘static bool std::_Function_base::_Base_manager<_Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Functor = boost::beast::detail::bind_front_wrapper<void (WebSocket::)(), std::shared_ptr >]’
/usr/include/c++/8/bits/std_function.h:676:19:   required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = boost::beast::detail::bind_front_wrapper<void (WebSocket::)(), std::shared_ptr >;  = void;  = void; _Res = void; _ArgTypes = {}]’
/usr/include/c++/8/bits/std_function.h:524:4:   required from ‘std::function<_Res(_ArgTypes ...)>::_Requires<std::function<_Res(_ArgTypes ...)>::_Callable<typename std::decay<_U1>::type>, std::function<_Res(_ArgTypes ...)>&> std::function<_Res(_ArgTypes ...)>::operator=(_Functor&&) [with _Functor = boost::beast::detail::bind_front_wrapper<void (WebSocket::)(), std::shared_ptr >; _Res = void; _ArgTypes = {}; std::function<_Res(_ArgTypes ...)>::_Requires<std::function<_Res(_ArgTypes ...)>::_Callable<typename std::decay<_U1>::type>, std::function<Res(ArgTypes ...)>&> = std::function<void()>&]’
src/WebSocket.cpp:40:42:   required from here
include/boost/beast/core/detail/bind_handler.hpp:254:45: error: cannot convert ‘boost::beast::detail::bind_front_wrapper<void (WebSocket::)(), std::shared_ptr >’ to ‘void (WebSocket::)()’ in initialization
, args(std::forward<Args>(args)...)
All relevant compiler information
Output of g++ -v:
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 8.3.0-6+rpi1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1)
Compiler flags in use:
-pedantic-errors -Wall -Wextra -Werror -std=c++17 -pthread

For the cross-compiler I was using gcc 10.1.0, but if I use 8.3.0, I get the same error. I will try cross compiling with 9.3.0, but not sure why it acts so differently with different compiler versions.

The error is in your file:

from src/WebSocket.cpp:13:

Yes it seems that my code only works in gcc 9 and 10, but not 8. I'm still wondering why the cross compiled code won't run on the pi. Do you know any reason why including beast in the project would make it require GLIBCXX_3.4.26?

Nothing springs to mind, but for us this is a corner case. If anything comes up in your investigations I'd like to hear about it so we can take any necessary action.
We do test against GCC8 as you can see from our CI:
https://github.com/boostorg/beast/runs/2381774539?check_suite_focus=true
But of course not all GCC8s are equal.

After more investigation it seems that the issue is that I am trying to create a callback by assigning the return value of boost::beast::bind_front_handler to a variable of type std::function<void()>. This works in GCC9 and 10, but not GCC8. Is this expected? Is there a different type I should use instead of std::function<void()> to store the callback?

Std function is not a good completion handler as it requires that the stored function object is copyable. Completion handlers may be move-only.
It sure if that’s the issue though

There is a library called fu2 which provides polymorphic move only function objects

Thanks, I will try using that instead. Also I found another issue cross compiling for raspbery pi. I thought I would write it here in case anyone else needs it later. I got the error that SSIZE_MAX was not declared. That's because for some reason in my gcc 8.3.0 cross compiler, lib/gcc/arm-linux-gnueabihf/8.3.0/include-fixed/limits.h did not have the following lines:
`#ifdef  __USE_POSIX
/* POSIX adds things to <limits.h>.  */
include <bits/posix1_lim.h>
#endif`
So some beast files were trying to use SSIZE_MAX with __USE_POSIX defined, but bits/posix1_lim.h was not being included, which is where SSIZE_MAX is defined. So adding those lines to the limits.h file solved the issue. Or including bits/posix1_lim.h directly where it is needed works, but that seemed messier.

Also, cross compiling with GCC 8.3.0 instead of 9 or 10 removes the error of /handover_websocket: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ./handover_websocket)` and the executable will actually run. Not sure if there is a way to cross compile with later gcc versions, but this works.

Thanks for the feedback @AnthonySabbagh
I did a little digging.
SSIZE_MAX is used in the implementation file file_posix.ipp which is intended only for unclusion in posix systems.
The symbol SSIZE_MAX is defined by POSIX but not by the C or C++ standards.
I am informed that there is no strict requirement that <limits.h> must bring in the posix definitions so it may be that beast is being over eager here.
I'm going to raise this as an issue and investigate a fix.
Maybe along the lines of:
namespace boost {
namespace beast {
using ssize_t = std::make_signed<std::size_t>
}
}

Thanks for raising this.

https://github.com/boostorg/beast/issues/2233

it looks like this is resolved


Fix the tool descriptions for cleaning tools

The cleaning tools currently don't have accurate descriptions. Need to fix & evaluate

Closed - cleaning tool is updated via PR #51.


Falsely recognizes tags in a time value (field 86)

Hi,
I just found that if tag 86 contains a time formatted like hh:mm:ss the :mm: portion will be recognized as a tag and if incidentally that minute portion is not an actual tag, it will freak out:
Here's an excerpt of the message in question. Note the time portion in the first 86 tag:
:61:1507160716CD7500,00FMSC1971033191//IA004587508020
NONEREF
:86:eDeposit in Branch/Store 07/16/15 10:33:22 AM 1800 S NEVADA AVE C
OLORADO SPRINGS CO 5133
:61:1507160716DD8000,00FCHK4201//IA008510335677
NONEREF
:86:CHECK
:62F:C150716USD706403,50
:64:C150716USD706403,50
:65:C150717USD706403,50

Results in:
AssertionError: Unknown tag 33in line: ':33:'

That's a nice one, apparently (some of) the regexes don't look for the tag at the beginning of the line... that's a bit silly. Shouldn't be too hard to fix

Thanks for your quick responses!
This module is super helpful for what I am trying to do! :+1:

Took a while to actually fix it. But it's released now :)

Awesome! I'll update and try it out.
Thanks.


Integrate GUI_Integration Branch into Development

Based on Issue #72 . Development branch can now use the effects that were created. Now, we have to allow the GUI to interact with the EffectsManager object.

Has been integrated and merged into Development. Found various issues which must be addressed. Please see Pull request #88 for more information.


yubihsm-shell: init at 2.3.1

Description of changes
Adds yubihsm-shell for interacting with yubihsm hardware. I can't get the manpages to build, since their Makefile(s)/Cmake might be making some assumptions that we need to patch, or upstream a fix for, so if anyone has any ideas I would appreciate a comment!
https://developers.yubico.com/yubihsm-shell/

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

-DCMAKE_SKIP_BUILD_RPATH=OFF solved the issue with help2man generation. This PR can now be merged, I believe.

There's a runtime bug, probably caused by the patching we're doing with substituteInPlace.
At runtime, we should not get Failed to parse URL: when running like this:
user: matthew swordfish in <IP_ADDRESS> nixpkgs on  mc/yubihsm [$] took 9s
❯ nix run github:matthewcroughan/nixpkgs/mc/yubihsm#yubihsm-shell
Using default connector URL: http://<IP_ADDRESS>:12345
yubihsm> debug all
Debug messages enabled
yubihsm> connect
[LIB - INF 19:22:51.631525] yubihsm.c:4158 (yh_init_connector): Loading http backend
[LIB - INF 19:22:51.631920] yubihsm_libusb.c:61 (backend_create): backend_create
[LIB - INF 19:22:51.634154] yubihsm_usb.c:48 (backend_connect): backend_connect
[LIB - ERR 19:22:51.634160] yubihsm_usb.c:57 (backend_connect): Failed to parse URL: 'http://<IP_ADDRESS>:12345/connector/api'
[LIB - ERR 19:22:51.634162] yubihsm.c:4195 (yh_connect): Failed when connecting: Connector operation failed
Failed connecting 'http://<IP_ADDRESS>:12345': Connector operation failed
[LIB - INF 19:22:51.634168] yubihsm_usb.c:75 (backend_disconnect): backend_disconnect
[LIB - INF 19:22:51.634219] yubihsm_usb.c:130 (backend_cleanup): backend_cleanup
yubihsm>

Instead, we should get "connection refused", like this, which is what happens with the Ubuntu binaries:
[LIB - INF 17:49:50.116657] yubihsm.c:4158 (yh_init_connector): Loading http backend
[LIB - INF 17:49:50.152443] yubihsm_curl.c:87 (backend_create): backend_create
[LIB - INF 17:49:50.152494] yubihsm_curl.c:92 (backend_connect): backend_connect
[LIB - INF 17:49:50.152499] yubihsm_curl.c:99 (backend_connect): Trying to connect to http://<IP_ADDRESS>:12345/connector/status
[LIB - ERR 17:49:50.152699] yubihsm_curl.c:120 (backend_connect): Failure when connecting: 'Failed to connect to <IP_ADDRESS> port 12345: Connection refused'
[LIB - ERR 17:49:50.152779] yubihsm.c:4195 (yh_connect): Failed when connecting: Unable to find a suitable connector
Failed connecting 'http://<IP_ADDRESS>:12345/': Unable to find a suitable connector
[LIB - INF 17:49:50.152795] yubihsm_curl.c:152 (backend_disconnect): backend_disconnect
[LIB - INF 17:49:50.152869] yubihsm_curl.c:214 (backend_cleanup): backend_cleanup

In the meantime, anyone who wants to use the software can do so without triggering this error, by using yubihsm-shell --connector yhusb:// instead of relying on this buggy interaction between the yubihsm-connector.


[e2e]: container tag main default slsa3

Repo: https://github.com/slsa-framework/example-package/tree/v25.0.95
Run: https://github.com/slsa-framework/example-package/actions/runs/3391116825
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.container.tag.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.container.tag.main.default.slsa3.yml
Trigger: push
Branch: v25.0.95
Date: Fri Nov  4 04:04:50 UTC 2022

Repo: https://github.com/slsa-framework/example-package/tree/v25.0.95
Run: https://github.com/slsa-framework/example-package/actions/runs/3391116825
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.container.tag.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.container.tag.main.default.slsa3.yml
Trigger: push
Branch: v25.0.95
Date: Fri Nov  4 06:06:57 UTC 2022

Repo: https://github.com/slsa-framework/example-package/tree/v25.0.96
Run: https://github.com/slsa-framework/example-package/actions/runs/3391631242
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.container.tag.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.container.tag.main.default.slsa3.yml
Trigger: push
Branch: v25.0.96
Date: Fri Nov  4 06:14:59 UTC 2022
Tests are passing now. Closing this issue.


Is this SDK for Javascript? No Async/Await

There is literally no Async/Await interface for operations. This definitely kills the whole essence of having an SDK for netcore.
Individual methods with Begin... End... (What is this?) It really makes no sense!
It's only in Java or Javascript we have the need to pass callbacks to methods. In C# netcore we use Async/Await, hence when a task is completed it returns the expected result and we make use of it, not the other way round.
We really need the team to build the interfaces like it was meant for C# developers. Thank you.
This is wrong (Begin... & End...)
        /// <inheritdoc/>
        public IAsyncResult BeginCopyObject(CopyObjectRequest copyObjectRequst, AsyncCallback callback, Object state)
        {
            ThrowIfNullRequest(copyObjectRequst);

            var cmd = CopyObjectCommand.Create(_serviceClient, _endpoint,
                                              CreateContext(HttpMethod.Put, copyObjectRequst.DestinationBucketName, copyObjectRequst.DestinationKey),
                                              copyObjectRequst);
            return OssUtils.BeginOperationHelper(cmd, callback, state);
        }

        /// <inheritdoc/>
        public CopyObjectResult EndCopyResult(IAsyncResult asyncResult)
        {
            return OssUtils.EndOperationHelper<CopyObjectResult>(_serviceClient, asyncResult);
        }

This is what we expect (Async/Await)
        /// <inheritdoc/>
        public async Task<CopyObjectResult> CopyObjectAsync(CopyObjectRequest copyObjectRequst)
        {
            ThrowIfNullRequest(copyObjectRequst);

            var cmd = CopyObjectCommand.Create(_serviceClient, _endpoint,
                                              CreateContext(HttpMethod.Put, copyObjectRequst.DestinationBucketName, copyObjectRequst.DestinationKey),
                                              copyObjectRequst);
            return await OssUtils.ProccessCommandAsync<CopyObjectResult>(cmd);
        }

You can follow this repo. The underlying layer uses HttpClient so the surface APIs are async.
You can search AlibabaCloud.SDK.Oss20190517 on Nuget。

连个async/await都没有 还是回调的异步 真的搞笑


Support package exports in jest-resolve

https://nodejs.org/docs/latest-v12.x/api/packages.html#packages_exports
Hopefully this can be offloaded to resolve. Tracked in https://github.com/browserify/resolve/issues/222

I chatted with @ljharb about this, and a future version of resolve will support this. So we don't have to implement anything here. Will just hook it up when resolve is released with support for it 🎉

@SimenB  - in the meantime do you think its possible to mock these modules somehow? like uuid, luxon etc My attempts have not worked but i am not super versed in jest mocks. Would be ideal to have some kind of stub to use in the meantime rather than changing core code all over.

As a small update here, Jest 26.4.0 includes #10393 which allows you to specify resolve's packageFilter option, which should allow people to put together custom resolvers and pluck exports out of the package.json. While it's not the native, seamless integration we wanna use, it might possibly unblock people

@SimenB Great! I'll look into those.
One question: in Browserify #222 you mentioned:

I'm currently working on support for ESM natively in Jest, ... (Apr 2020)

Since I'm building code exclusively with native ESM, interested in what's the status with that resolver.

Status of the resolver is in that issue. Status of ESM in general is #9430

Made a work-around that someone might find useful: https://github.com/akauppi/firebase-jest-testing/blob/master/sample/hack-jest/custom-resolver.cjs
It allows the use of normal import statements, and fetches the mapping from the same library's package.json. "Good enough for now" for me - allows testing that export is likely usable.

Progress in resolve appears to be a bit slow. Would you consider using Webpack's enhanced-resolve in meantime?
Seems like you can create a Node-compatible ESM resolver with:
const enhancedResolve = require('enhanced-resolve');
const resolve = enhancedResolve.create( {
  conditionNames: ['import', 'node', 'default'],
  extensions: []
} );

You can plug in your own resolver in Jest, replacing the use of resolve: https://jestjs.io/docs/en/configuration#resolver-string
We're (highly) unlikely to migrate away from resolve, but if you are able to put together a resolver that supports exports that'd be a great workaround while we wait for resolve to add support 👍

@overlookmotel I updated the link in my entry above (it was broken). It may help, if you wish to do a custom resolver, though it's purpose is different from a generic ES modules importer.

@akauppi seems like your resolver doesn't support conditional exports. Or are they supported implicitly by options.defaultResolver?

@piranna It likely doesn't. I just needed ES module handling and the resolver is made with the one project in mind - not as a general fix.

@piranna It likely doesn't. I just needed ES module handling and the resolver is made with the one project in mind - not as a general fix.

Fair enought. Not sure if give it a try and improve it, or wait until we have properly support... :-/
What I'm trying to achieve, is to test that a different file is provided for Node.js and for browser. I could do it with with module field in package.json, but I want to do it TheCorrectWay(tm), that now it's using ESM.

Until this is implemented in resolve, I'm trying to use a custom resolver. Is there a way to know if the file to resolve has been included with require() or import?

Currently no. I was gonna wait until resolve added it to figure out what the API should be in Jest. Thoughts on what the API should look like? I guess we should say node or browser based on the env, and then a flag for ESM vs CJS? Only doing the latter first I guess.

Yeah, at lest ESM vs CJS is needed. Or I maybe Jest should just pass to the resolver a list of conditions (e.g. ["node", "import", "default"]).
Btw, I figured out how to workaround this for now (I just list things I know will be imported and not required) :pray:

I wonder if it's possible to combine https://github.com/lukeed/resolve.exports with packageFilter? Would anybody be up for experimenting with that?

Working on @overlookmotel's suggestion above, here's a resolver that uses enhanved-resolve to do the work here to support export maps and unblock this, for anyone else getting stuck.
This can replace the default resolver (maybe it should extend it for caching, but this works).
export_maps_resolver.js:
// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771
const resolver = require('enhanced-resolve').create.sync({
  conditionNames: ['require', 'node', 'default', 'import'],
  extensions: ['.js', '.json', '.node', '.ts']
})

module.exports = function (request, options) {
  return resolver(options.basedir, request)
}

Note that require is first in the conditions so we get the CJS module by default where there are alternatives because an ESM is likely to mess up further up the chain. At least that's my experience so far.
Then in Jest config:
"resolver": "./export_maps_resolver.js"

@rvagg I've tried your resolver but was not able to make it work. Is it intended for jsdom environment, node, or both? Does it supports conditional imports and self-references? I'm asking in case i'm doing something brong...

@piranna I don't see why it shouldn't work for both environments, for my narrow needs (I'm not a Jest user, just contributing to a couple of projects that use Jest) it seems to be working for both - although in one project I've had to disable jsdom because of the TextEncoder and TextDecoder problem, but that's a separate issue to this.
See https://github.com/webpack/enhanced-resolve for configuration options for enhanced-resolve, you may be able to tweak it to your situation. As I suggested above, there may be other problems related to ESM further up the Jest stack, which is why I was point it toward require first, and the packages I want to consume offer both CJS and ESM alternatives so it works since it gets to consume the former.

Thanks @rvagg, I'll take a look on the configs :-)

While the workaround works, when mocking builtin nodejs modules I would get the following error message:
Cannot find module 'fs' from 'cache.ts'

While I never did figure out what was going wrong here, I managed to falling back to default resolver
// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771
const resolver = require('enhanced-resolve').create.sync({
  conditionNames: ['require', 'node', 'default'],
  extensions: ['.js', '.json', '.node', '.ts', '.tsx']
})

module.exports = function (request, options) {
  if (request === 'fs') {
    return options.defaultResolver(request, options);
  }
  return resolver(options.basedir, request)
}

thanks @FrozenKiwi and @rvagg for workaround. I edited some part so it can work in my test
// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771
const resolver = require('enhanced-resolve').create.sync({
  conditionNames: ['require', 'node', 'default'],
  extensions: ['.js', '.json', '.node', '.ts', '.tsx']
})

module.exports = function (request, options) {
// list global module that must be resolved by defaultResolver here
  if (['fs', 'http', 'path']) {
    return options.defaultResolver(request, options);
  }
  return resolver(options.basedir, request)
}

While I could not manage the enhanced-resolver's workaround about two weeks ago, I wrote yet another custom resolver (heavily inspired by @akauppi's workaround).
After copy-pasting it over several projects by now, I've decided to publish it as jest-node-exports-resolver package. So I hope it could be usefull for the community while we're waiting for built-in implementation.

@axmad386 I think you are missing an includes in your if statement
// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771
const resolver = require('enhanced-resolve').create.sync({
  conditionNames: ['require', 'node', 'default'],
  extensions: ['.js', '.json', '.node', '.ts', '.tsx']
})

module.exports = function (request, options) {
// list global module that must be resolved by defaultResolver here
  if (['fs', 'http', 'path'].includes(request)) {
    return options.defaultResolver(request, options);
  }
  return resolver(options.basedir, request)
}

@mcshaman oh my mistake, updated. Thanks

@SimenB had a good clue to solving my problem. I am currently using lowdb in one of my projects which is purely ESM. Without a main property in their package.json (only exports) I am unable to resolve the entry point. I can work around this using the packageFilter function in combination with resolve.exports to resolve the exports value and add it as the main property of the package.
// resolver.cjs
const { resolve } = require('resolve.exports')

module.exports = function (request, options) {
	return options.defaultResolver(request, {
		...options,
		packageFilter: (package) => ({
			...package,
			main: package.main || resolve(package, '.'),
		}),
	})
}

// jest.config.cjs
module.exports = {
	"resolver": "<rootDir>/resolver.cjs",
	transformIgnorePatterns: [
		"node_modules/(?!(lowdb)/)",
	],
}

// babel.config.cjs
module.exports = {
	env: {
		test: {
			plugins: ['@babel/plugin-transform-modules-commonjs'],
		},
	},
}

Has anyone been able to get the workaround to work in react-scripts? unfortunately resolver is not part of the jest options that can be overridden.

Hmm, so is this a blocker for anyone else to adopt any ESM-only packages (*cough sindresorhus *cough) since imports of such packages can't be resolved by jest-resolve?

@JaneJeon I wouldn’t call it a blocker. See my work-around on Aug 2020.
What I do is ship the package as ESM, and a CJS resolver that people can use by adding one line to their Jest setup. You are free to copy the approach, of course!

am

Is there an easier possibility? 😄
I am running in a similar issue where Jest can't find a package that uses esports in the package.json
https://github.com/prisma/nexus-prisma/issues/137

CRA should allow you to specify resolver - this repo is not the place for that

I'm looking into unblocking this now, and I think what @nicolo-ribaudo suggested here is a good start

Yeah, at lest ESM vs CJS is needed. Or I maybe Jest should just pass to the resolver a list of conditions (e.g. ["node", "import", "default"]).

Doing so should allow people to implement their own resolver a bit more cleanly.
I have one unresolved question, though. I think we need to switch browser and node conditions somehow. Maybe depending on the env (i.e. typeof window === 'undefined'). Or maybe an environment should define its own conditions? Or should it be like testEnvironment itself where you have one thing in your config and able to override on a test file basis?

FWIW, I have a version locally where I use http://npmjs.com/package/resolve.exports in resolve's pathFilter option. Seems to work for the simple cases I mention, but it needs to get passed conditions from the runtime (this why I want to start there). Once that is passed I think it should be possible to create a userland resolver to plug into Jest

@SimenB Passing just ["import", "default"] or ["require", "default"] might be enough for now. When implementing custom resolvers, people can add the conditions they need (for example, Node.js).

Good point, let's start there!

Opened up #11859. As mentioned there, I'm seeing a cache issue, but beyond that it seems functional 🙂
If anyone is willing to pull down that branch and hack on the bug I'm seeing I'd be very happy 👍 I don't think I'll personally spend any more time on it this week, and next week doesn't look too good either...

https://github.com/facebook/jest/releases/tag/v27.2.0 will pass conditions to custom resolvers, which I believe unblocks writing resolvers that properly supports exports field.
Again, in the future we'll add builtin support, but hopefully this conditions change will fit it with what resolve eventually adds as an API for this

We've tried to figure this out for a couple days now, and none of the above workarounds seem to be helping.
We have a number of packages that are written up with the node esm spec, and only use something like
  "exports": {
    ".": "./dist/index.js",
    "./package.json": "./package.json"
  },

or
  "exports": {
    "import": "./dist/esm/index.js",
    "require": "./dist/cjs/index.js"
  },

in their package.json.
Our basic jest config for the consumers of those packages is like so:
collectCoverage: true,
    globals: {
        'ts-jest': {
            useESM: true,
        },
    },
    moduleNameMapper: {
        '^(\\.{1,2}/.*)\\.js$': '$1',
    },
    preset: 'ts-jest/presets/default-esm',

Does anyone have a basic working example of a workaround they can drop here?

@GrossDesignCo Did you try my work-around? https://github.com/facebook/jest/issues/9771#issuecomment-677759334

At https://github.com/k-g-a/jest-node-exports-resolver/pull/6 I have a PR that add to jest-node-exports-resolver support for string and nested exports & self-referencing packages, so I think it fixes most of the issues of jest-resolver. If there's something missing please tell me and I'll see if I can complete it.
@SimenB, can this code be used as basis to fix the support of package exports in jest-resolve and jest itself?

For sure, please submit a PR 👍

For sure, please submit a PR

Ok, how should I proceed? A PR using it as dependency? Modify the code of `jest-resolve? Or how do you propose?

Modifying, definitely 🙂

@GrossDesignCo Did you try my work-around? #9771 (comment)

For these we need to resolve to some number of internal packages in node_modules without knowing which ones are installed, as opposed to a specific one. I'm actually not 100% certain how your workaround works, so I'll need to spend some time digging in before I can say for sure.
I also tinkered with enhanced-resolve and a couple of the jest packages people have rolled from here, so far with no luck.

At k-g-a/jest-node-exports-resolver#6 I have a PR that add to jest-node-exports-resolver support for string and nested exports & self-referencing packages, so I think it fixes most of the issues of jest-resolver. If there's something missing please tell me and I'll see if I can complete it.

@piranna I left a comment on that PR, I tried that resolver as a custom one, but still ran into a couple issues.

Tentatively, the following seems to be working for my case:
// jest-resolver.cjs
const enhancedResolve = require("enhanced-resolve");

const resolver = enhancedResolve.create.sync({
  extensions: [".json", ".js", ".jsx", ".ts", ".tsx"],
  mainFields: ["exports", "import", "require", "module", "main"],
  conditionNames: ["import", "node", "require"],
});

module.exports = function (request, options) {
  return resolver(options.basedir, request).replace(/\0#/g, "#");
};

// jest.config.js
...
resolver: "<rootDir>/jest-resolver.cjs",

100% unrelated - package exports has nothing to do with ESM directly, and the API is still experimental: https://nodejs.org/docs/latest-v16.x/api/vm.html#vm_class_vm_sourcetextmodule

I'm thinking of plugging in resolve.exports but only support . case (essentially the resolver in https://github.com/facebook/jest/issues/9771#issuecomment-890454033). I don't think resolve's current API works well for other exports, but getting the main entry point from exports should hopefully unblock lots of people (I assume that and /package.json (which already works since we ignore exports field 😅) will cover most use cases)

Thanks for pushing this forward @SimenB 🙏

#11919 has landed. It comes with 3 caveats

as mentioned, it only applies to the main entry point (.) aka require('some-module')
it's only applied if there is no main field in package.json and there is no index.js file in the root of the package (this is to make the change non-breaking for v27 - will probably remove that for v28)
Jest does not pass the node condition by default, so some modules (like Sindre's) will still not resolve. I plan to fix that for Jest 28, but it requires some more changes in the runtime as well, and I don't think it can be done in a way that won't break existing code

That out of the way, please give 27.3.0 a whirl and report any issues with it 🙂

Would it be possible to default to the exports-defined entrypoint when the --experimental-vm-modules flag is passed? That's probably brushing against breaking change territory.
We've got a couple packages that have both exports, main, and module keys defined, but when passing that flag in 27.3.0 it causes the package with main to break on `The requested module 'x' does not provide an export named 'y'.
In our module x the main key points to the cjs version of the package, while module points to esm and exports has the two keys import and require inside that point to esm and cjs dist folders respectively.
We're hoping to use it in conjunction with other internal libraries that only use the exports field, and right now they can't be imported side by side by Jest in either esm or cjs mode.

@SimenB Is v28 going to support named exports other than just .?

yes

A fix for using native ES modules in node:
// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771
const importResolver = require('enhanced-resolve').create.sync({
  conditionNames: ['import', 'node', 'default'],
  extensions: ['.js', '.json', '.node', '.ts']
})
const requireResolver = require('enhanced-resolve').create.sync({
  conditionNames: ['require', 'node', 'default'],
  extensions: ['.js', '.json', '.node', '.ts']
})

module.exports = function (request, options) {
  let resolver = requireResolver
  if (options.conditions?.includes('import')) {
    resolver = importResolver
  }
  return resolver(options.basedir, request)
}

Could this be the root cause of this issue?
https://github.com/cloudflare/miniflare/blob/666a69433f6c3131b6f85ad746207846cc5c04e9/packages/http-server/src/index.ts#L337-L341
See here for a full repro.
https://github.com/cloudflare/miniflare/blob/666a69433f6c3131b6f85ad746207846cc5c04e9/packages/http-server/src/index.ts#L337-L341

A fix for using native ES modules in node:
// temporary workaround while we wait for https://github.com/facebook/jest/issues/9771
const importResolver = require('enhanced-resolve').create.sync({
  conditionNames: ['import', 'node', 'default'],
  extensions: ['.js', '.json', '.node', '.ts']
})
const requireResolver = require('enhanced-resolve').create.sync({
  conditionNames: ['require', 'node', 'default'],
  extensions: ['.js', '.json', '.node', '.ts']
})

module.exports = function (request, options) {
  let resolver = requireResolver
  if (options.conditions?.includes('import')) {
    resolver = importResolver
  }
  return resolver(options.basedir, request)
}

Which file does this code go into, please?

https://jestjs.io/docs/configuration#resolver-string

I just stumble upon this issue after I kept getting SyntaxError: Unexpected token 'export' because a dependency used a multi-module format based on exports entry points, and Jest was ignoring it.
Frankly, it is absurd to me how this issue has remained open so long because Jest wanting to reinvent the wheel using webpack's, browserify's or any other resolver that don't support nodejs' features instead of using nodejs' own require 🤦♂ (at least while running jest in node mode).
Now there are even resolver library plugins, why? 😩
The cleanest fix is to replace the resolver to nodejs' yourself:
module.exports = (request, options) => {
	return require.resolve(request);
};

Put a condition and call options.defaultResolver if you want a more selective use of it.

Frankly, it is absurd to me how this issue has remained open so long

Feel free to send PRs that fixes this issue without breaking backwards compatibility.
All you achieve by being snarky is erode any motivation and joy I, and others, find in providing a testing library for free.

so long because Jest wanting to reinvent the wheel ...

Don't take it out of context.
Sorry for eroding your motivation. I didn't meant it. I just wanted to provide a short clean fix.
I can't make a PR, it would take me way too long finding the line where it is supposed to call the resolver.
Maybe if you know where it is. Add an if (mode == 'node') return require.resolver... don't use other resolvers.
😁✌

I've finally fixed conditional imports at https://github.com/k-g-a/jest-node-exports-resolver/commit/900da2e7eac05090b569e5614bf0b6b6838443de, I think now jest-node-exports-resolver is feature complete, you can use it a resolver string. Also @SimenB, feel free to take a look at it if it can help you fix this in Jest itself (and give me credits for it ;-) ).

Finally 😅
https://github.com/facebook/jest/releases/tag/v28.0.0-alpha.0
Please give it a try and open up issues for any bugs/missing features 🙂

so, no more need of custom resolvers? :-)

in theory

This is brilliant news, thank you for all your hard work! ❤

One issue I got at work is uuid returning ESM for jest-environment-jsdom (as we don't provide node condition).

Does 28.0.0-alpha.0 really fix this? I still get "Cannot find module" with default configuration.

Please give it a try and open up issues for any bugs/missing features 🙂

Is version 28.0.0-alpha.0 supposed to fix this issue?
https://github.com/typescript-eslint/typescript-eslint/issues/4210
I tried upgrading but am still getting this error. I'm not sure how it's related to jest as the error happens when running eslint...

With https://github.com/facebook/jest/releases/tag/v28.0.0-alpha.3 the implementation of exports was rewritten, and the one known bug (reported by @uriklar above) was fixed. Hopefully I didn't introduce any regressions either 😀
Please test it!

Upgrading to v28.0.0-alpha.2 worked for me when importing "root" exports, but the resolver seems to still have issues when importing Subpath exports or Subpath patterns. Has anyone else run into this issue?

@SimenB v28.0.0-alpha.3 seems to have fixed the issue with subpaths as referenced above, works perfectly so far. I will continue to test and will report issues if any.

there was an issue if your pattern was "./some-non-existent-dir/*": "./some-existent-dir/*" which was fixed in alpha 3 🙂

Ah, wonderful @rmolinamir!

@SimenB  I was wondering if in v27 or in v28 there is a way to call import, bypassing jest's mocking system?
A while back I was trying to complete a PR for react-router, but I got stuck trying to implement the tests because I couldn't figure out how to do a regular import

@perrin4869 not related to this issue.
However, the answer is "no" - you cannot use "real" import from within Jest. I recommend setting up a separate script using plain node code (you can still use expect if you want to keep the assertions) if you want to bypass Jest's implementation

@SimenB Ah sorry, I was just getting notifications in this issue and suddenly I felt like revisiting!
Thanks for the advice! I was just wondering, how were you envisioning running this separate script? exec()?

@perrin4869 Not sure if this helps, but you can use exports to bypass mocking.
In our project, we expose "mocked" versions of each packages for testing (rather creating manual mocks within the packages' clients, cause DRY).  We then also export a direct path to classes if I ever wish to bypass those mocks.  so any external code calling import { MailClient } from @com/mail gets the mocked version, but we ever explicitly want to actually interact with the full implementation we call import { MailClient } from @com/mail/client
It's pretty specific, may not be applicable to your situation, but it sounds like you want something similar to the reasons we set this up.

@FrozenKiwi Thanks! That's a convenient setup :)
I'm referring here about being able to test the exports field itself - make sure it doesn't suddenly break with a new release of the library. Unfortunately this doesn't seems possible with jest...

There's a lot of people subscribed to this issue, please keep discussion about things not related to the resolver implementation of exports within Jest elsewhere.


cannot create random location multi cursor

VSCode Version:1.8.2
OS Version:ubuntu 15.10

Steps to Reproduce:
i can create multi cursors by alt-shift+(down/up) but not all the time where i wanna place cursor is exactly under the line in sublime i can press and hold ctrl and click to add cursor to any location but seems theres no way to do this in vscode . is there a way to to this without hacking ctrl-d combination by adding prefix?

Duplicate of https://github.com/Microsoft/vscode/issues/3091

@NikosEfthias It is possible with Alt+click, but there is no way to change it to Ctrl+click.

@alexandrudima  the problem is alt click is reserved on linux by the X


Week 25 Bria and Calissa Review Ticket

Calissa
College Board Quiz:

Datatypes: Notes and Practice FRQ
Bria
Pair Assignment
We will be planning the algorithmic dance using resources from Khan Academy on sorting.
Theme:

Insertion sort

Each new index is sorted, similar to drawing a new card from a deck and placing it in order

Quiz Results

Data Types Notebook


Cannot reproduce the paper results with the exchange_rate dataset

Hi,
I've used your scripts to try and reproduce the results of the exchange dataset but the results look different for some forecast horizons:

I wonder if you've made any changes to the code base after you run your experiments that might have had a negative impact on performance.
The results I got are still better than for other Transformers, and very close to the published ones for "Repeat". If this is the case, it would indicate that none of the models in the study is capable of correctly predicting the exchange rate in the long term better than the last available value (which is not the case for other datasets).

Yes, we deleted some unused layer and a weight initialization of DLinear model, but it doesn't affect the results in most dataset (I tested on a few datasets, and the results are almost the same as before).
You can use the following model and the script to accurately reproduce the result in the table. The sequence length can be set to 336 or 96. 96 can achieve a better result. 336 can reproduce the result in the table.

Replace the DLinear.py with the following code (our first version of DLinear):
https://github.com/cure-lab/LTSF-Linear/blob/9d933a8050543eaf2074309145d7c9757d4833ec/models/DLinear.py

Use the following script:
python -u run_longExp.py
--is_training 1
--root_path ./dataset/
--data_path exchange_rate.csv
--model_id Exchange_96_720
--model DLinear
--data custom
--features M
--seq_len 96
--pred_len 720
--enc_in 8
--des 'Exp'
--itr 1 --batch_size 32 --learning_rate 0.005

The expected result is :
Sequence Length 96:
Sequence Length 336:

It is hard to predict exchange rate only based on historical value. You can also take a look at the weights of DLinear. It follows the trend of historical data to predict the future value, so it might be better than repeat sometimes.

Thanks a lot, @mixiancmx  for your quick and clear response. I've been able to reproduce the results based on the code and command you have shared.
I agree with you that it's very difficult to predict the exchange rate. At least linear models are similar to random, unlike transformers that have worse performance.


Fix memory leak in cmp_calc_protection()

Triggered by a  memory allocation failure.
Detected by PR #18355

Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

This pull request is ready to merge

@DDvO does it apply to 3.0? Did you forget to cherry pick it?


RealWebSocket send throws writerTask NPE

okhttp 4.3.0 throws NPE each time I try to send command via websocket.
writerTask is null in RealWebSocket::runWriter
  private fun runWriter() {
    this.assertThreadHoldsLock()

    taskQueue.schedule(writerTask!!) // crashes in this line
  }

Stacktrace:
Caused by kotlin.KotlinNullPointerException
       at okhttp3.internal.ws.RealWebSocket.runWriter + 398(RealWebSocket.java:398)
       at okhttp3.internal.ws.RealWebSocket.send + 352(RealWebSocket.java:352)
       at okhttp3.internal.ws.RealWebSocket.send + 332(RealWebSocket.java:332)

test:
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.WebSocketListener
import okhttp3.mockwebserver.MockWebServer
import org.junit.Rule
import org.junit.Test

class OkHttpBug {
    @get:Rule
    val server = MockWebServer()

    @Test
    fun test() {
        val request = Request.Builder()
            .url(server.url("/path"))
            .header("User-Agent", "Test Case")
            .build()
        val client = OkHttpClient()
        val listener = object : WebSocketListener() {

        }
        val command = """{ "id": "file" }"""
        val webSocket = client.newWebSocket(request, listener)
        webSocket.send(command)
        webSocket.close(1000, "RealWebSocket crashes with runWriter writerTask!! NPE")
    }
}

This seems to be 100% reproducible in 4.3.0. Had about 1000 crashes on that version on small amount of sessions.
This (almost) does not happen with the same code on okhttp 4.2.2 (2 crashes in 1000x user count in much longer period)

Will fix.

Great bug report. Will try to get a release out tonight.
https://github.com/square/okhttp/pull/5707

FYI, OkHttp 4.3.1 is released.

Hmm @swankjesse we ran into this issue again and we're using OkHttp 4.5.0.
kotlin.KotlinNullPointerException
        at okhttp3.internal.ws.RealWebSocket.writePingFrame$okhttp(RealWebSocket:569)
        at okhttp3.internal.ws.RealWebSocket$initReaderAndWriter$$inlined$synchronized$lambda$1.runOnce(TaskQueue.kt:219)
        at okhttp3.internal.concurrent.TaskRunner.runTask(TaskRunner.kt:116)
        at okhttp3.internal.concurrent.TaskRunner.access$runTask(TaskRunner.kt:42)
        at okhttp3.internal.concurrent.TaskRunner$runnable$1.run(TaskRunner.kt:65)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

Hey @simtse, are you still facing this issue and were you able to open an issue for it?


Provide $inject, $location as annotated parameters to .otherwise()

See http://angular-ui.github.io/ui-router/site/#/api/ui.router.router.$urlRouterProvider#methods_otherwise
(I was having issues using the $injector parameter in an otherwise function with ng-strict-di enabled.)

Looks correct, thanks


fix(Button): outline static variant styles

so, I think for better ui/ux and affordance we should to set hover to outline static variants
@phojie WDYT ?

@mnenie, I think this already has the same output as solid-white.

@mnenie, I think this already has the same output as solid-white.

yea you may be right, but they differ in that the outline variant does not have bg-base by default.


Added new methods

What's changed:

Added new methods

getFeeStats()
getVersionInfo()
getTransactions()

Fixed a minor issue where GetEventsResponse.TransactionHash didn't get deserialized.

Breaking changes:

Renamed wasmId to wasmHash to be more consistent with the official documentation and other SDKs.
Wasm hash arguments now expect a hex encoded string instead of a base64 one.
Moved PaginationOptions class from a child class of StellarDotnetSdk.Requests.SorobanRpc.GetTransactionsRequest to StellarDotnetSdk.Requests.SorobanRpc.
Moved and renamed enum GetTransactionResponse.GetTransactionStatus to TransactionInfo.TransactionStatus.
Changed Transaction.SorobanTransactionData property to get-only, use the added SetSorobanTransactionData method instead.

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
[x] I have read the CONTRIBUTING document.
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

Are we not missing the XDR changes?

Added.

Are we not missing the XDR changes?

Added.

Hmm would you not expect the changes that you've made to be reflected by XDR files?
If not, I think we should remove the XDR commit and add an issue in our repository where we add support for the latest XDR changes.

Are we not missing the XDR changes?

Added.

Hmm would you not expect the changes that you've made to be reflected by XDR files?
If not, I think we should remove the XDR commit and add an issue in our repository where we add support for the latest XDR changes.

Reverted.


[A-1] Initial migration of mongo role.

Refactored existing fh-devops mongo role to be reusable across projects.

I made some necessary changes to this branch, but it's still not working. Current status of the PR is that mongod will not start, the log message is:
Attempted to create a lock file on a read-only directory: /data/db, terminating


Synchrobench compare bug

The main fix is in MyBufferOak.
The arguments' order was wrong and resulted in a NullPointerException when running synchrobench.
The other code is PIACIP which is needed for the one of the paper's tests.

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

I have reviewed the new code and the changes looks good to me. I am going to approve the merge to free way for other commits. If Eran has any comments we might add the fixes just after.


Diffetent state

hi,I'm new to this.
There are two different states from mapStateToProps and reducer
mapStateToProps function log an object like { 0 : { searchResults : [] } }
I want to know why the object has 0 and how to remove it
const mapStateToProps = (state) => {     console.log(state);     return {         searchResults:state.searchResults     } }
reducer function return an object like { searchResults : [] }
export function reducer(state = {},action){      switch(action.type)     {         case ACTION_SEARCHRESULT:             return Object.assign({},state,{                 searchResults:[]             });         default:             return state;     } }
how can I change this code? Thanks for reply.

This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux. Thanks!


[BUG] - Missing Fonts

Describe the bug
Doesn't account for menu fonts not being installed on the users machine.
Expected behavior
https://brutaldev.com/post/installing-and-removing-fonts-using-c

Fixed Version 0.6.5


OSD-23707: Fix the sftp_upload() to make it able to upload the file to SFTP

What type of PR is this?
bug
What this PR does / Why we need it?
It will create a temporary file when the sftp upload function is called, and the SSH known hosts file will be set up within this temporary directory. This avoids permission issues by using a directory that the script can write to.
Which Jira/Github issue(s) does this PR fix?
Resolves #OSD-23707
Special notes for your reviewer
Pre-checks (if applicable)

[X] Validated the changes in a cluster
[ ] Included documentation changes with PR

/retest

/retest

/lgtm