[v6] useHref violating the rule of Hooks

What is the issue?
We encounter a case scenario where the useHref Hook will cause the violation of the rule of Hooks. The order of Hooks execution is different between renders. We completely understand that by putting the useHref hook inside a condition or in a loop can cause this violation, however we don't have an answer on how can the following example be achieved without violating this rule of Hooks.
Link to the example => https://codesandbox.io/s/magic-list-rt3ig?file=/src/App.js
In the example you can see that we are generating href links with useHref while mapping a dynamic array of links. As you are adding more links to the array using the provided form, the order of Hooks will be changed between re-renders causing the violation of Hooks.
Suggestions / Questions

Do you have an example how can this be done with the current library?
Why is the function createHref, used in the useHref Hook, not exported from the library? Using it in such use cases as above would be perfect.
What about extending a bit the useHref Hook? So, that maybe accepts an array of paths? Or even better maybe something like useState Hook, where you have the method to set the state but instead of the state we could have the createHref exposed?

Thank you very much for your help.

You should use useHref inside of the components rendered in the loop.

You should use useHref inside of the components rendered in the loop.

@pshrmn Great idea.
For example:
const Mapper = ({pathname}) => useHref(pathname);

const Baz = ({list}) => (

    {list.map((item, index) => (

        <Mapper pathname={item} />

    ))}

);

Thank you @pshrm & @artola . For our use case changing the key did the trick. No more wrong Hooks order 👍


SPM integration not working when archiving app for the AppStore

GoogleMapsUtils framework works with SPM when building and working with the app, but the issue shows when trying to upload final app to the AppStore due to unsupported  architectures.

I tested out all of the possible integration methods, and none seem to be working:

CocoaPods -> After adding GoogleMapsUtils using CocoaPods it's not possible to include the framework (something wrong with podspec?)
Carthage -> Fails to build due to issue with new Xcode, there's a workaround but it's a hassle, check Xcode12Workaround
SwiftPackageManager -> This one works until you try to build the app for the AppStore.

Environment:

macOS Catalina 10.15.7
Xcode 12.0.1 (12A7300)
GoogleMaps 4.0.0
GoogleMapsUtils 3.4.0

Steps to reproduce:

Create new Xcode project
Embed GoogleMaps using any method
Embed GoogleMapsUtils using SMP from Xcode 12
Import frameworks and try to package the app for the AppStore submission
Observe uploading to AppStore fails due to Found an unexpected Mach-O header code: 0x72613c21 error

Working solution:

when you download GoogleMapsUtils.xcframework from the releases page and  manually add it to the project everything works fine

If you'd like I can provide sample project where GoogleMaps is added using CocoaPods and  and GoogleMapsUtils is added using SwiftPackageManager and archiving fails.

Thanks for flagging this issue, glad you were able to find a workaround by using the .xcframework directly. I'll need to dig into what's going on with the SPM integration in the meantime.
For the second issue you raised, is the issue quite similar to the SPM issue or does the application not compile at all? The Objective-C and Swift samples found within ./samples use CocoaPods as a package manager so I'm curious why that didn't work for you. If you don't mind, can you copy/paste your Podfile, or better yet, attach a sample project?

Google and Firebase Frameworks all suffer from the same issue
see
https://github.com/firebase/firebase-ios-sdk/issues/6472

Google and Firebase Frameworks all suffer from the same issue
see
https://github.com/firebase/firebase-ios-sdk/issues/6472

I was able to upload by right clicking the archive and doing the following:
Show in Finder -> Right Click App -> Show Package Contents -> Products -> Applications -> Show Package Contents (again)
Then from here, delete anything Google/firebase related in Plugins and Frameworks.

I was able to upload by right clicking the archive and doing the following:
Show in Finder -> Right Click App -> Show Package Contents -> Products -> Applications -> Show Package Contents (again)
Then from here, delete anything Google/firebase related in Plugins and Frameworks.

Closing due to no new reports of this being an issue since 2021. Please re-open if this is still affecting app archiving.


Optional chaining: a?.()() is parsed as (a?.())()

Flow version: flow-parser 0.108.0
Expected behavior
In a?.()(), the outer call expression should be of type OptionalCallExpression.
In a?.().b, the member expression should be of type OptionalMemberExpression.
Actual behavior
The outer call expression is of type CallExpression as if the inner call expression were in parens: (a?.())().
The member expression is of type MemberExpression as if the inner call expression were in parens: (a?.()).b.

Link to Try-Flow or Github repo:

https://astexplorer.net/#/gist/cb552979d476b074013786d94198bebd/55ca44317e6158fadadf87806fe29d23e5d3e170

Thanks for the report! Should be fixed now, we'll update the ast explorer with the next release.

Please consider having a look at the other parser issue I submitted while you're at it


Closure actions

Wonderful addon! ⛵
Unless I'm mistaken currying + closure actions could be used instead of the current method for setting secondary arguments.
Perhaps a future version could deprecate the previous usage (simplified codebase) and align with closure actions. Will also simplify passing extra arguments for misc types of actions.
What do you think?
<!-- before -->
{{#draggable-object-target action="setStatus" status="Ready to Publish"}}
  Ready to Publish
{{/draggable-object-target}}

<!-- after -->
{{#draggable-object-target action=(action 'setStatus' 'Ready to Publish')}}
  Ready to Publish
{{/draggable-object-target}}

Source:
https://dockyard.com/blog/2015/10/29/ember-best-practice-stop-bubbling-and-use-closure-actions

Absolutely.  My goal is once I finish adding the feature I'm working on, I'm going to modernize a lot of the addon, including the usage of the the targets.  Unfortunately that will mean breaking backward compatibility.  When that goes out, it will be a version of 0.5 and once it's stable I'll move the library to 1.0 finally.  I plan on making an issue with a list of what I'd like to see updated.  I know some folks have requested this so they could help out as well.

@dgavey Do you want a help with that issue?


Avoid that Alexa recognize ESPALEXA as light.

I use espalexa to turn on and off my mediacenter...
But everytime i say alexa turn off all the lights alexa turn off also the mediacenter....
there is a way to make alexa discover as something different?
Thanks in advance.
Enrico.

I think you can create a group using the Alexa app and then ask it to turn of only the group.


docs: Update disable disruption on nodepool to use budgets

Fixes #N/A
Description
Our docs currently recommend using do-not-disrupt annotation to enable disruption on nodePool. This PR adds a change to use node disruption budget instead.
How was this change tested?
NA
Does this change impact docs?

[x] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[ ] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.01%) to 82.467%

Files with Coverage Reduction
New Missed Lines
%

pkg/providers/amifamily/ami.go
1
90.56%

Totals

Change from base Build<PHONE_NUMBER>:
-0.01%

Covered Lines:
5550

Relevant Lines:
6730

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.481%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
5551

Relevant Lines:
6730

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.467%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
5550

Relevant Lines:
6730

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.01%) to 82.467%

Files with Coverage Reduction
New Missed Lines
%

pkg/providers/amifamily/ami.go
1
90.56%

Totals

Change from base Build<PHONE_NUMBER>:
-0.01%

Covered Lines:
5550

Relevant Lines:
6730

💛  - Coveralls


Less thin fonts

When f.lux on my computer is enabled I have a hard time reading the
s and
s, because they have a font weight of respectively 200 and 100. I would prefer it personally if the font would be a bit wider so it's more legible.
If you like this suggestion I can make a PR for it

Going to work on some color contrast errors which should fix this


Cannot reproduce the result.

I appreciate your wonderful work! the demo is excellent!
However when I try to reproduce the result using your default settings (just running accelerate launch --config_file 8gpu.yaml train_mvdiffusion_image.py --config configs/train/stage1-mix-6views-lvis.yaml, not changing any yaml except the data path), I find that the network failed to produce a normal result.
After finishing the first stage training (30k iters), the network do not learn when to generate rgb or normal maps (generate then randomly regardless of the switch), also do not learn to generate white background (often gray), and do not learn to generate the correct view (the front view sometimes generate a right image, or the right view sometimes generate a left or back image)
the gt and output for inference are attached here. Do you have any idea to solve this? Thank you in advance!

Our model is trained on 8 GPUs with a batch size 256 totally after accumulation. Using only one gpu will be infeasible.

oh sorry I tried 8gpu (wrongly written as 1gpu in the command but yeah I'm using 8gpus :) And that does not work.

I also tried overfitting to only one scene, and it does not learn to generate the correct view (the front view sometimes generate a right image, or the right view sometimes generate a left or back image) after 1k iters with batchsize = 256,  without changing any of your code.

Hello, in our experiments, we also find that overfitting on one scene will be not feasible. How much data did you use for the training in this experiment ?

I appreciate your wonderful work! the demo is excellent! However when I try to reproduce the result using your default settings (just running accelerate launch --config_file 8gpu.yaml train_mvdiffusion_image.py --config configs/train/stage1-mix-6views-lvis.yaml, not changing any yaml except the data path), I find that the network failed to produce a normal result. After finishing the first stage training (30k iters), the network do not learn when to generate rgb or normal maps (generate then randomly regardless of the switch), also do not learn to generate white background (often gray), and do not learn to generate the correct view (the front view sometimes generate a right image, or the right view sometimes generate a left or back image)
the gt and output for inference are attached here. Do you have any idea to solve this? Thank you in advance!

Hi @flamehaze1115, I tried 23k objaverse scenes, 32 scenes, 1 scene respectively. They all failed. Could you please double check that the script: configs/train/stage1-mix-6views-lvis.yaml is the correct one that you used for training?
Because currently I find another problem: If I set the hyperparameter train_dataset:bg_color:"three_choices" the same as your config, the bg during inference is often grey even when the single image input has a white background.

While if I set that hyperparameter to be "white", the wrong grey background disappear, which may indicate that the configs/train/stage1-mix-6views-lvis.yaml might be mistakenly a little different from your setting.

I find that the stage1 training yaml has zero_init_camera_projection: true, which will cause different camera embeddings to be the same after a 2-layer MLP's projection. May I know whether this is on purpose?

I appreciate your wonderful work! the demo is excellent! However when I try to reproduce the result using your default settings (just running accelerate launch --config_file 8gpu.yaml train_mvdiffusion_image.py --config configs/train/stage1-mix-6views-lvis.yaml, not changing any yaml except the data path), I find that the network failed to produce a normal result. After finishing the first stage training (30k iters), the network do not learn when to generate rgb or normal maps (generate then randomly regardless of the switch), also do not learn to generate white background (often gray), and do not learn to generate the correct view (the front view sometimes generate a right image, or the right view sometimes generate a left or back image)
the gt and output for inference are attached here. Do you have any idea to solve this? Thank you in advance!

I also have the same problem after the training of stage 1. Did you fix the problem?
And I'm not sure which checkpoint of stage 1 should put in training yaml of stage 2,  did you train stage 2 successfully?

Same problem, is there anything wrong in the code release?

Hi @flamehaze1115, I tried 23k objaverse scenes, 32 scenes, 1 scene respectively. They all failed. Could you please double check that the script: configs/train/stage1-mix-6views-lvis.yaml is the correct one that you used for training?
Because currently I find another problem: If I set the hyperparameter train_dataset:bg_color:"three_choices" the same as your config, the bg during inference is often grey even when the single image input has a white background.
While if I set that hyperparameter to be "white", the wrong grey background disappear, which may indicate that the configs/train/stage1-mix-6views-lvis.yaml might be mistakenly a little different from your setting.

The gray background is reasonable, which indicates your training doesn't converge. When your model converges well, the predicted image will have white background.

Fixed a severe training bug. The "zero_init_camera_projection" in 'configs/train/stage1-mix-6views-lvis.yaml' should be False. Otherwise, the domain control and pose control will be invalid in the training.

I appreciate your wonderful work! the demo is excellent! However when I try to reproduce the result using your default settings (just running accelerate launch --config_file 8gpu.yaml train_mvdiffusion_image.py --config configs/train/stage1-mix-6views-lvis.yaml, not changing any yaml except the data path), I find that the network failed to produce a normal result. After finishing the first stage training (30k iters), the network do not learn when to generate rgb or normal maps (generate then randomly regardless of the switch), also do not learn to generate white background (often gray), and do not learn to generate the correct view (the front view sometimes generate a right image, or the right view sometimes generate a left or back image)
the gt and output for inference are attached here. Do you have any idea to solve this? Thank you in advance!

I also have the same problem after the training of stage 1. Did you fix the problem? And I'm not sure which checkpoint of stage 1 should put in training yaml of stage 2. Did you train stage 2 successfully?

I have the same problem with loading checkpoint of stage 2. The missing weights are related to 'joint' blocks.

Have you resolved the issue? Did you change the bg_color to white in the config?

Hi @flamehaze1115, I tried 23k objaverse scenes, 32 scenes, 1 scene respectively. They all failed. Could you please double check that the script: configs/train/stage1-mix-6views-lvis.yaml is the correct one that you used for training?
Because currently I find another problem: If I set the hyperparameter train_dataset:bg_color:"three_choices" the same as your config, the bg during inference is often grey even when the single image input has a white background.
While if I set that hyperparameter to be "white", the wrong grey background disappear, which may indicate that the configs/train/stage1-mix-6views-lvis.yaml might be mistakenly a little different from your setting.

Did you finally change the bg_color to white in the config?

I appreciate your wonderful work! the demo is excellent! However when I try to reproduce the result using your default settings (just running accelerate launch --config_file 8gpu.yaml train_mvdiffusion_image.py --config configs/train/stage1-mix-6views-lvis.yaml, not changing any yaml except the data path), I find that the network failed to produce a normal result. After finishing the first stage training (30k iters), the network do not learn when to generate rgb or normal maps (generate then randomly regardless of the switch), also do not learn to generate white background (often gray), and do not learn to generate the correct view (the front view sometimes generate a right image, or the right view sometimes generate a left or back image)
the gt and output for inference are attached here. Do you have any idea to solve this? Thank you in advance!

I also have the same problem after the training of stage 1. Did you fix the problem? And I'm not sure which checkpoint of stage 1 should put in training yaml of stage 2. Did you train stage 2 successfully?

I have the same problem with loading checkpoint of stage 2. The missing weights are related to 'joint' blocks.

@aquarter147 @GliAmanti @xxlong0 Which checkpoint to load in stage 2, and how to solve the missing weights problem, may i ask did you solve this?
Have anyone successfully run stage 2 ? ...


Long 520s are being truncated

http://<IP_ADDRESS>:3000/catalog/285741

http://<IP_ADDRESS>:3000/catalog/329157


Grammar, translation an structure modifications

Changed verbs/adjectives in 3rd grammatical person for their 2nd grammatical person equivalents, erased unnecesary commas, and adjusted shifty phrase structures.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thanks!


website link broken

The website link provided,
http://www.blitzlogger.com/blitz-chrome-url-extension.html
Is broken.

Cheers


How to Recover Deleted Messages from Huawei Mate 9

"Any way to get back the deleted text messages from Huawei Mate 9, I forgot to backup some important text messages from my Mate 9 before clear the message box!!! How can I do now?"
In fact, no matter what is the reason that you lost your files from Huawei Mate 9 or other Android devices, you can easily recover deleted messages from Huawe Mate 9/Mate 9 Pro by using the Android Data Recovery.
Android Data Recovery is the professional data recovery tool that can one click to directly recover deleted and lost data including contacts, SMS, photos, call logs, videos, audios, WhatsApp messages and more from any Android devices just like Huawei Mate 9.

If you have synced the lost data before, you can recover from the backup file. If not, I think you should not add more data to your device anymore. Then, it is better for you to try some professional recovery methods,  or you can also try third-party data recovery programs.

You can use software to recover you data back. But do remember act fast over it and don't try writing something more over it otherwise the chances of getting your things back will decrease.

Actually, there are several apps that can do the job. But, FonePaw Android Data Recovery stands away from the crowd. The software is compatible with more than 6000 devices. FonePaw Android Data Recovery lets you recover deleted or lost contacts, text messages, photos, WhatsApp messages, music, video and more documents. This Huawei (Android) data recovery software only reads data on your Huawei phone or tablet. What's worthy to mention is that, it won't modify anything, keep or leak anything on your device to others.
So, you can watch this tutorial bout how to recover deleted text messages from Huawei Mate 9.


Ability to enable/disable upload images

Changes add ability to disable file uploading in case when somebody need to use in img tag base64 data instead of image url.

Coverage remained the same at 96.875% when pulling 4faa7e4ef741c4bce57c4fa8db2adf5d7c51c3ef on webdev4u:master into 75f47436ad71f81783ba9c916eba43b1f533dfdd on summernote:master.

Reasonable. Actually I thought django-summernote is not necessary without out-of-box support for image uploading on django-side, but it might be wrong. Thanks.


Unable to build stations or rockets at all, double checked to ensure I followed the guides.

Version of Advanced Rocketry
AdvancedRocketry-1.12.2-1.7.0-232-universal.jar (Twitch client)
Have you verified this is an issue in the latest unstable build
N - I only have access to the version on the Twitch client, there is no indication that this is an unstable build.
Version of LibVulpes
LibVulpes-1.12.2-0.4.2-75-universal.jar
Version of Minecraft
1.12.2
Crash report or log (if applicable)
N/A - Does not crash
Description of the problem
Unable to build Stations or Rockets, both devices throw "Invalid Launch pad structure!" errors on correctly built launch pads. Both instances I've built the launch pads as such: 4x4 launch pad, structure tower starting at the same level as the launch pad & Rocket assembler / station builder 1 block above the launch pad, directly next to it as depicted in images on the Advanced Rocketry guide site and in other issues listed on github. They also refuse to scan or build despite being powered.

The Interface side(the side with the green bars and the green and red light at the bottom) has to face away from the launch pad.
I recreated your setup locally and once I've flipped both machines the Launch Pad got recognized.


Improvements to setting up Leveling characters

Added search field for disabled runs to find what you are looking for faster
Added "clear all" button to enabled runs to clear the enabled runs faster
Added popup mentioning that the leveling profiles require enabling a leveling profile, and asks user to either confirm or deny this automated action which will clear all enabled run profiles and auto enable the leveling run profile

The force push was just to clean this PR, accidentally got some commits in that weren't part of this PR


Include versioning information on the sample apps.

Fixes #2513

Does this change the behavior of how the app loads/installs? Does it overwrite a previous version of the app or add another version without deleting the old one? I currently have 4 WOCCatalogs sitting around that seem to differ by the PublisherDisplayName. I'm expecting that I'll now have 1 sitting around for each version I use.

Change itself is fine.
Does this cover all our apps or just the samples apps in winobjc?  If not all, probably want to confirm with @tadam-msft  that it covers the majority of the apps.

@memontic-ms no. It only changes the version and what is shown on the window chrome as the app display name. It seems that the appx install is a little wonky and overwrites the appx if its the same publisher but a different version (I guess its sort of like an update but it doesn't prompt you) and allows multiple installs of the same app with different publishers.

@pradipd it affects all apps that use the override targets which will be all our apps except for the samples repo. Seems good enough to me.


ThreeDeeTouch.onHomeIconPressed not working

Trying to enhance one of my apps using this plugin. ThreeDeeTouch.configureQuickActions works great and I'm able to open the app using a QuickAction, but this action doesn't seem to be detected in the app. Only thing I have for now to see if the function works is the following:
		ThreeDeeTouch.onHomeIconPressed = function(payload) {alert(payload.type);
			if(payload.type=='play_last') {

			}else{
				console.log(JSON.stringify(payload));
			}
		}

This is in a function called onDeviceReady I run on "deviceready":
document.addEventListener("deviceready", onDeviceReady, false);
Any ideas on this?

Can you share the entire file this is in? Either the html or js file..

I have attached the file.
jquery.zip

Can you help me with my project?

Looks ok. Dunno what the problem is. Can you try creating a plain new Cordova app and try to get it working?

Found the issue, apparently a conflict with another plugin :(
Needle in a haystack!


us/ne/dawes.csv - zip codes

The zip codes in us/ne/dawes.csv have been put into the street field instead of the postcode field.

Thanks for reporting this @nigelhorne! Looks like the original source has turned off MapServer Directory listing. Can you add a sample of 10 or so addresses that are causing issues.

$ egrep " \d\d\d\d\d" dawes.csv |wc -l
4198
$ egrep " \d\d\d\d\d" dawes.csv | head -10
-103.3152251,42.9947185,,"WAYSIDE RD, WHITNEY, NE 69367",,,,,,,6f188ee702edd951
-103.2337367,42.9948398,460,"WAYSIDE RD, CHADRON, NE 69337",,,,,,,a289937abcb614e9
-103.2096575,42.9977177,18574,"HWY 385, CHADRON, NE 69337",,,,,,,9fce07ff4b01da82
-103.2430395,42.9919228,460,"WAYSIDE RD, CHADRON, NE 69337",,,,,,,cd59ccc3fe2c1b69
-103.0760659,42.994241,541,"BRADDOCK RD, CHADRON, NE 69337",,,,,,,28c01ac5b89e65e4
-103.175999,42.9914686,771,"N WHITNEY LAKE RD, WHITNEY, NE 69367",,,,,,,0617c855d546fc16
-103.2322911,42.9902774,462,"WAYSIDE RD, CHADRON, NE 69337",,,,,,,d8880b9460e0ff76
-102.9993683,42.7008008,,"BERRYVILLE RD, CHADRN, NE 69337",,,,,,,155cc172eeff49c3
-103.0097031,42.7341251,16130,"HWY 385, CHADRON, NE 69337",,,,,,,ed024b6e4a46a288
-103.2316533,42.9844187,463,"WAYSIDE RD, CHADRON, NE 69337",,,,,,,8585694927521c8d

Thanks a ton @nigelhorne, @trescube is taking a look at getting this fixed


[JOSS review] Some morphology functionality is not available

Loading the test.asc morphology, I am not able to use "Sholl analysis" (prints "To be done!" on the command line), and "Update Cell names" and "Distance to Pia" do not seem to work either (errors on the command line, see below). I am also not quite sure how to test the Plotting somas for a group of neurons functionality – does this require a single file with multiple cells in it? I tried loading the same cell several times, but this leads to a broken display.
Error for "Update Cell names" (after loading a cell three times):
Traceback (most recent call last):
  File "/mnt/data/miniforge3/envs/patchview/lib/python3.8/site-packages/patchview/patchview.py", line 6803, in morph_analysis_event
    self.updateInterCellDistance()
  File "/mnt/data/miniforge3/envs/patchview/lib/python3.8/site-packages/patchview/patchview.py", line 6747, in updateInterCellDistance
    summary.item(j, 9).value[p]
IndexError: invalid index to scalar variable.

Error for "Distance to Pia":
Traceback (most recent call last):
  File "/mnt/data/miniforge3/envs/patchview/lib/python3.8/site-packages/patchview/patchview.py", line 6805, in morph_analysis_event
    self.measureDist2Pia()
  File "/mnt/data/miniforge3/envs/patchview/lib/python3.8/site-packages/patchview/patchview.py", line 6765, in measureDist2Pia
    if self.pia is not None:
AttributeError: 'MainWindow' object has no attribute 'pia'

openjournals/joss-reviews#4706

Hi,
I've fixed "Sholl analysis" part. Please see documentation here.
You are right about the Plotting somas for a group of neurons functionality. It only works for reconstruction file with multiple cells in it (like this one). Likewise,  "Update Cell names"  is only useful under this  situation.
"Distance to Pia" only works if the ASC file actually has an entry named "Pia" .
Documentation of the these functions has been updated.
Thanks!

I did a quick check with the provided files, and everything seems to work as intended now. Thanks.


Dependencies installation fails on node 12

Describe the bug
Dependencies installation fails when using node 12
To Reproduce
Steps to reproduce the behaviour:

Install node 12
Checkout the repo
Run yarn
See build errors

Expected behaviour
Dependencies are installed with no errors
Logs
Build log

yarn install v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS><1.0.0".
[4/4] 🔨  Building fresh packages...
[8/10] ⠁ puppeteer
[-/10] ⠁ waiting...
[3/10] ⠁ puppeteer
[9/10] ⠁ node-sass
warning Error running install script for optional dependency: "/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using<EMAIL_ADDRESS>node-pre-gyp info using<EMAIL_ADDRESS>| darwin | x64
node-pre-gyp info check checked for \"/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/Users/sergey/Repos/mermaid/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sergey/Repos/mermaid/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/sergey/.node-gyp/12.11.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/sergey/.node-gyp/12.11.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/sergey/Repos/mermaid/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/sergey/.node-gyp/12.11.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \\\n           ^
<scratch space>:208:1: note: expanded from here
ToBoolean
^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:2567:3: note: 'ToBoolean' has been explicitly marked deprecated here
  V8_DEPRECATED(\"ToBoolean can never throw. Use Local version.\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \\\n              ^
<scratch space>:215:1: note: expanded from here
BooleanValue
^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:2605:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATED(\"BooleanValue can never throw. Use Isolate version.\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:5426:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2706:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2706:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
    static void Initialize(v8::Handle<v8::Object> exports);
                           ~~~~^
../fsevents.cc:63:6: warning: field 'async_resource' will be initialized after field 'lockStarted' [-Wreorder]
   : async_resource(\"fsevents:FSEvents\"), lockStarted(false) {
     ^
In file included from ../fsevents.cc:82:
../src/constants.cc:89:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagNone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagNone));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:90:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMustScanSubDirs\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:91:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUserDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUserDropped));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:92:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagKernelDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagKernelDropped));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:93:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagEventIdsWrapped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagEventIdsWrapped));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:94:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagHistoryDone\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagHistoryDone));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:95:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagRootChanged\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagRootChanged));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:96:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMount));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:97:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUnmount\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUnmount));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:98:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemCreated\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemCreated));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:99:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemRemoved\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRemoved));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:100:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemInodeMetaMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemInodeMetaMod));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:101:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemRenamed\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemRenamed));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:102:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemModified\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemModified));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:103:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemFinderInfoMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemFinderInfoMod));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:104:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemChangeOwner\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemChangeOwner));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:105:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemXattrMod\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemXattrMod));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:106:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsFile\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsFile));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:107:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsDir\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsDir));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../fsevents.cc:82:
../src/constants.cc:108:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagItemIsSymlink\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsSymlink));
          ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATED(\"Use maybe version\",
  ^
/Users/sergey/.node-gyp/12.11.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../fsevents.cc:85:16: error: variable has incomplete type 'void'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
               ^
../fsevents.cc:85:31: error: no member named 'Handle' in namespace 'v8'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                          ~~~~^
../fsevents.cc:85:48: error: expected '(' for function-style cast or type construction
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                     ~~~~~~~~~~^
../fsevents.cc:85:50: error: use of undeclared identifier 'exports'
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                                 ^
../fsevents.cc:85:58: error: expected ';' after top level declarator
void FSEvents::Initialize(v8::Handle<v8::Object> exports) {
                                                         ^
                                                         ;
23 warnings and 11 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/sergey/Repos/mermaid/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command \"/usr/local/bin/node\" \"/Users/sergey/Repos/mermaid/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=5\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v12.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /Users/sergey/Repos/mermaid/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=5 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command \"/usr/local/bin/node\" \"/Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/sergey/Repos/mermaid/node_modules/watchpack/node_modules/fsevents
node-pre-gyp ERR! node -v v12.11.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
✨  Done in 204.68s.

Desktop:

OS: MacOS 10.14.5
node: v12.11.0

Additional context
We node-sass version 4.11 which doesn't support node 12. However, upgrading to 4.12 does not solve the problem.
Related tickets:
https://github.com/sass/node-sass/issues/2747
https://github.com/fsevents/fsevents/issues/278
Workaround
Don't use node 12 for development.

Hi! I would like to submit a PR to solve this issue


HTML Blocks

I have a markdown file with html in it e.g.

PyPi module
N/A

Version Info

macOS 14.5, Python 3.10

Ubuntu 20.04 focal, Python 3.10

This, according to commonmark is allowed see https://spec.commonmark.org/0.31.2/#html-blocks
and I've checked it out https://spec.commonmark.org/dingus/ and it works fine there.
Also see https://spec.commonmark.org/0.31.2/spec.json which has their test spec (in JSON) for this scenario:
  {
    "markdown": "
\n
\n    \n           hi\n    	\n
\n
\n\nokay.\n",
    "html": "
\n
\n    \n           hi\n    	\n
\n
\n
okay.
\n",
    "example": 149,
    "start_line": 2457,
    "end_line": 2476,
    "section": "HTML blocks"
  },

I've taken a copy of html_renderer.py and modifying it for my markdown files. So far so good, except for this html block.
It translates into

<table class="ja_info_table">
<tr class="ja_info_tr">
etc.

I've dumped the AST and there are no HTML block elements, they are all RawText.
In html_rendered.py script there is a function:
    @staticmethod
    def render_html_block(token: block_token.HtmlBlock) -> str:

But it's never called (checked it with a print()). I checked out base_renderer and it doesn't seem to be called there either.
I can't tell if the problem is with my code or if the renderer is just not calling the render_html_block or the AST parser is failing to detect the raw HTML in the markdown file at all.

Hi @cppgent0, I guess you've run into the "infamous usage bug" #56 here. That is, are you sure you call Document(input) after initializing your instance of HtmlRenderer (ideally within the with construct)?


Added instructions for deploying on Moovweb XDN

Hi @ianand
First of all, thanks a lot for the detailed instructions about how to deploy a Frontity project on Moovweb XDN 😊
I've followed the process explained in this guide and I've found 2 issues in the process
xdn init is not detecting the Frontity project
As per the instructions, I guess the command xdn init  should detect the Frontity project and do automatically 2 things:

Install the proper Frontiity connector as a dev dependency → "@xdn/frontity"
Add the proper connector in xdn.config.js

module.exports = {
  connector: "@xdn/frontity",
};

xdn init is not doing this automatically (in the tests U've done) so these extra steps should be added to the guide in order the next step to work (xdn dev fro example)
**xdn deploy throws an error *
The log shows a message saying Add "origin" to the "backends" property in xdn.config.js. so maybe an extra step should be added to the guide in order for everything to work properly
(base) ⬢  demo-moovweb-deploy  xdn deploy
🔑 Logged in as<EMAIL_ADDRESS>
fatal: not a git repository (or any of the parent directories): .git

You have uncommitted changes. No commit URL will be stored in moovweb.app.

📋 Deploying to:
> team=Private space
> site=demo-moovweb-deploy
> environment=default
> xdn-version=2.46.3

⌛ Initializing...
> Deployment #1
> Since this is the first deployment to the default environment, it will take longer than subsequent deployments.
done (25191ms)

🛠  Building your app for deployment on the MOOVWEB XDN

  - mode: production
  - target: both
  - public-path: /static/

Building es5 bundle
Building module bundle
Building server bundle

> sw/service-worker.js not found... skipping.
> Bundling routes.js and xdn.config.js... done.

***** Deployment Failed *********************************************************
*                                                                               *
*  🖥  View the build log in XDN Developer Console:                              *
*  https://moovweb.app/juanma-garrido/demo-moovweb-deploy/env/default/builds/1  *
*                                                                               *
*  Need help? Try posting in the XDN Developer Forums:                          *
*  https://forum.moovweb.com                                                    *
*                                                                               *
*  Or browse the XDN Documentation:                                             *
*  https://developer.moovweb.com                                                *
*                                                                               *
*********************************************************************************

Project build failed

Error:
Errors occurred while attempting to deploy your application to the XDN edge.
The following route could not be processed:
* fallback: Error: Add "origin" to the "backends" property in xdn.config.js.
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:19897
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:18446
    at Object.next (/Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:18551)
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:17463
    at new Promise (<anonymous>)
    at o (/Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:17208)
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:19622
    at Array.map (<anonymous>)
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:19598
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:18446
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:21712
    at /Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:18446
    at Object.next (/Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:18551)
    at i (/Users/juanma/PROJECTS/2021/FRONTITY/DEMOS/FEBRUARY/demo-moovweb-deploy/.xdn/lambda/routes.js:2:17265)

I guess you'll know better than anyone how to solve these issues but let me know if there's something we can do to help from the Frontity side

@juanmaguitar will take a look. there might have been a regression from last week.

I've reproduced the error using the same process that worked last week. Definitely a regression. Will update you when resolved.

@juanmaguitar this issue has been resolved you will need to update the XDN CLI to the latest version by re-running:
npm install -g @xdn/cli

and then the documented steps should work. Here's a transcript below but don't hesitate to ping me if you run into anything:
ishananand@Ishan-Anand temp % npx frontity create front-2021-03-01-02
npx: installed 189 in 8.886s
? Pick a starter theme to clone: @frontity/mars-theme (recommended)
✔ Creating README.md.
✔ Creating package.json.
✔ Creating frontity.settings.js.
✔ Cloning @frontity/mars-theme.
✔ Installing dependencies.
✔ Downloading favicon.ico.

Frontity project created.

? Do you want to receive framework updates by email? No

Ok, that's fine! 😉
You can subscribe at any point with npx frontity subscribe <email>.

Run cd front-2021-03-01-02 && npx frontity dev and have fun! 🎉

You can find docs at https://docs.frontity.org/.
For technical support and assistance please join our community at https://community.frontity.org/.

ishananand@Ishan-Anand temp % npm install -g @xdn/cli
/Users/ishananand/.nvm/versions/node/v12.18.4/bin/xdn -><EMAIL_ADDRESS>+<EMAIL_ADDRESS>updated 4 packages in 10.23s
ishananand@Ishan-Anand temp % cd front-2021-03-01-02
ishananand@Ishan-Anand front-2021-03-01-02 % xdn init
ℹ installing @xdn/core, @xdn/cli, @xdn/prefetch, @xdn/devtools, @xdn/frontity, @xdn/react...
npm WARN deprecated<EMAIL_ADDRESS>joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated<EMAIL_ADDRESS>This version has been deprecated and is no longer supported or maintained
npm WARN deprecated<EMAIL_ADDRESS>This version has been deprecated and is no longer supported or maintained
npm WARN deprecated<EMAIL_ADDRESS>This version has been deprecated and is no longer supported or maintained
npm WARN deprecated<EMAIL_ADDRESS>This version has been deprecated and is no longer supported or maintained
npm WARN deprecated<EMAIL_ADDRESS>This version has been deprecated and is no longer supported or maintained
npm WARN deprecated<EMAIL_ADDRESS>Use cheerio-select instead

><EMAIL_ADDRESS>postinstall /Users/ishananand/code2/temp/front-2021-03-01-02/node_modules/ejs
> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.

+<EMAIL_ADDRESS>+<EMAIL_ADDRESS>+<EMAIL_ADDRESS>+<EMAIL_ADDRESS>+<EMAIL_ADDRESS>+<EMAIL_ADDRESS>added 331 packages from 202 contributors and audited 1181 packages in 17.868s

77 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

✔ installing @xdn/core, @xdn/cli, @xdn/prefetch, @xdn/devtools, @xdn/frontity, @xdn/react... done.
> xdn.config.js not found, creating...
> sw/service-worker.js not found, creating...
> routes.js not found, creating...

Added the following scripts:

xdn - Run xdn commands using the local version of the XDN CLI.
xdn:dev - Simulate your app on the XDN locally.
xdn:build - Build your app for deployment on the XDN.
xdn:deploy - Build and deploy your app on the XDN.

🎉 Your app is now ready to deploy on the MOOVWEB XDN!

ishananand@Ishan-Anand front-2021-03-01-02 % xdn deploy
🔑 Logged in as<EMAIL_ADDRESS>
fatal: not a git repository (or any of the parent directories): .git

You have uncommitted changes. No commit URL will be stored in moovweb.app.

📋 Deploying to:
> team=Private space
> site=front-2021-03-01-02
> environment=default
> xdn-version=2.46.9

⌛ Initializing...
> Deployment #1
> Since this is the first deployment to the default environment, it will take longer than subsequent deployments.
done (23240ms)

🛠  Building your app for deployment on the MOOVWEB XDN

  - mode: production
  - target: both
  - public-path: /static/

Building es5 bundle
Building module bundle
Building server bundle

> Building service worker...
> Bundling routes.js and xdn.config.js... done.
> Writing static asset manifest... done.
done (33582ms)

📦 Packaging...
> Zipping project folder
> Size: 1.24 MB
done (196ms)

📡 Uploading...
> Uploading package
done (7957ms)

⌛ Deploying...
> Verifying that the deployment has reached your nearest global POP...
done (65079ms)

***** Deployment Complete ****************************************************
*                                                                            *
*  🖥  XDN Developer Console:                                                 *
*  https://moovweb.app/ishan-anand/front-2021-03-01-02/env/default/builds/1  *
*                                                                            *
*  🌎 Website:                                                               *
*  https://ishan-anand-front-2021-03-01-02-default.moovweb-edge.io           *
*                                                                            *
******************************************************************************

ishananand@Ishan-Anand front-2021-03-01-02 %

@ianand  I works great!
PR approved and merged
How to deploy to Moovweb XDN is now part of our official docs! 🎉
Thanks for your contribution


Move tokenSet.update(_:) to .onChange(of:)

Platforms Impacted

[x] iOS
[ ] macOS

Description of changes
This resolves issue #1427 by moving Fluent token set updates away from a mid-render update and into a .onChange block for the environment variable. This ensures that the view state cannot be interrupted mid-render, silencing a new warning introduced in Xcode 14.
Binary change:

File
Before
After
Delta

libFluentUI.a
28,689,720
28,838,304
148,584

FluentUITestApp
31,734,955
31,798,411
63,456

Verification
Verified that modified controls update as expected. See CardNudge demo below:

Pull request checklist
This PR has considered:

[x] Light and Dark appearances
[x] iOS supported versions (all major versions greater than or equal current target deployment version)
[ ] VoiceOver and Keyboard Accessibility
[ ] Internationalization and Right to Left layouts
[x] Different resolutions (1x, 2x, 3x)
[x] Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
[ ] iPad Pointer interaction
[x] SwiftUI consumption (validation or new demo scenarios needed)
[ ] Objective-C exposure (provide it only if needed)

Microsoft Reviewers: Open in CodeFlow

Are we ok with a 148k delta?

Are we ok with a 148k delta?

To be clear, I really really don't like it. And, I don't personally know of another way to write this code correctly. I'd be open to any alternative approaches/solutions, but AFAIK this is the "right" way to observe, and react to, changes to an environment variable.


New buttons implementation

[x] Split buttons into clean components
[x] Add stories for new components
[ ] Add back stories for menu buttons & buttongroups
[ ] Add specs
[ ] Update dependent components

@fspoettel These are very good enhancements. I'd like to throw something in here:
This is the current syntax for a simple button with an icon.
<Button flavor="neutral" onClick={action()}>
  <ButtonIcon
    position="left"
    sprite="utility"
    icon="download"
  />
  Download
</Button>

I would like to write less code (with the option to still write exactly the above if needed). What about if we'd (optionally) offer something like:
// default flavor
// default icon position
<Button onClick={action()} icon="utility.download">
  Download
</Button>

@philippfrank very good idea! Now that we have a dedicated IconButton and I solved the one case where this was not possible in the past (more prop for IconGroups), it is safe to add this. I'm a bit on the fence whether we should go with icon="" sprite="" or icon="sprite.icon" as you proposed since it would be the only place in the whole project where that is possible. We could implement <IconButton icon="x" sprite="y" /> first as a shortcut and later implement your proposed syntax across all components. What do you think?

@fspoettel I am very open to anything which requires less code ;-)

@philippfrank the minimal signatures now are:
/* Same content/title */
<Button title="Bleep" />

/* Differing content/title */
<Button title="Bleep">Bloop</Button>

/*  Same content/title and left icon */
<Button title="Bleep" icon="foo" sprite="bar" />

/*  Differing content/title and left icon */
<Button title="Bleep" icon="foo" sprite="bar">Bloop</Button>

/* Right Icon */
<Button title="Bleep">
  <ButtonIcon
    position="right"
    icon="foo"
    sprite="bar"
  />Bleep
</Button>
/* Icon-Only button */
<IconButton icon="foo" sprite="bar" />

/* Stateful Icon-Only button */
<StatefulIconButton selected icon="foo" sprite="bar" />

The obvious worst-case is a button with a right-aligned icon. We could add a shortcut prop position and default it to left not sure whether that is worth it though. cc @brunottonurb

Awesome enhancements @fspoettel 💯


Support for fuel gauge sensor MAX17048

Hi, I am using this chip in my projects and I think that it is mature enought to be shared. And hopefully it can be useful for someone.
I also added a simple example. I tested it on NRF52 but it should work anywhere because it just requires a regular I2C.

I'd note that Zephyr now has a fuel gauge API that this would better be represented by I believe. I don't think this is stale so removing that regardless.

@aaronemassey please take a look and maybe make some suggestions on if this could be ported to the new fuel gauge api

@aaronemassey please take a look and maybe make some suggestions on if this could be ported to the new fuel gauge api

It looks like all of the exposed sensor channels (one of the sensor channels doesn't exist anymore) already exist as a fuel gauge property. So I don't see any reason why this couldn't be ported to the fuel gauge API with relative ease.
I'd intended to do much of the driver migration myself (should be straight forward refactor) with reviews from their active maintainers.

Thank you for your time. I would be glad to adapt it to the new API taking into account all your comments.
I was reading these links about the new api
https://docs.zephyrproject.org/latest/hardware/peripherals/fuel_gauge.html
https://github.com/zephyrproject-rtos/zephyr/blob/6cdef0894fe7aced7f58b1f34fa1ca2b691f56cb/include/zephyr/drivers/fuel_gauge.h
https://github.com/zephyrproject-rtos/zephyr/blob/6cdef0894fe7aced7f58b1f34fa1ca2b691f56cb/drivers/fuel_gauge/sbs_gauge/sbs_gauge.h
But I'm not sure about how to implement this api. Is there any example that I can use for reference?
Thank you

Thank you for your time. I would be glad to adapt it to the new API taking into account all your comments.
I was reading these links about the new api https://docs.zephyrproject.org/latest/hardware/peripherals/fuel_gauge.html https://github.com/zephyrproject-rtos/zephyr/blob/6cdef0894fe7aced7f58b1f34fa1ca2b691f56cb/include/zephyr/drivers/fuel_gauge.h https://github.com/zephyrproject-rtos/zephyr/blob/6cdef0894fe7aced7f58b1f34fa1ca2b691f56cb/drivers/fuel_gauge/sbs_gauge/sbs_gauge.h
But I'm not sure about how to implement this api. Is there any example that I can use for reference?
Thank you

Working prototype for the SBS Compliant Fual Gauge driver
Reminder: This API is still in the experimental stage, so some things are likely to change. I don't mind being responsible for those changes and migrations though.

Reminder: This API is still in the experimental stage, so some things are likely to change. I don't mind being responsible for those changes and migrations though.
No worries, I know that is is experimental and it is no problem if I have to do more changes in the future.

I have just adapted the code to the fuel gague api, updated the sample and added emul tests. I still want to improve a bit the code and the tests but can you tell me if the api is correctly implemented (in terms of structure)?
I would be grateful if you can also take a look on the sample and tell me if this is how the fuel gauge api should be used.
https://github.com/zephyrproject-rtos/zephyr/blob/16043f62a40ab6c5f807d9dec5bc2f866bcf08c2/samples/fuel_gauge/max17048/src/main.c
Basically I call the function fuel_gauge_get_prop with a list of propts and then read the result.
Thanks

I would be grateful if you can also take a look on the sample and tell me if this is how the fuel gauge api should be used. https://github.com/zephyrproject-rtos/zephyr/blob/16043f62a40ab6c5f807d9dec5bc2f866bcf08c2/samples/fuel_gauge/max17048/src/main.c Basically I call the function fuel_gauge_get_prop with a list of propts and then read the result.
Thanks

Left some fairly minor comments. This is great, thank you!

I finished all the improvements I wanted to do. I also tested the example with a real device and it works perfectly!

In any case, I did not want to reinvent the wheel implementing a software float processing because there are probably other easier options since this problem should be common

For most architectures, software floating point support is already implemented by the toolchain and there is no need for you to manually provide one.

Thanks for the info @stephanosio
Shame on me, but just doing bit shifting I can avoid all the floats. The values sent by the IC are just integer values and only the constants are float

I applied all the changes. Basically removed all float operations, cleaned coded based on your suggestions, added more documentation and updated the sensor references in the doc.
Everything compiles and run as expected (also tested in my devices)

Thanks for your patience with my reviews, I'm still getting used to GitHub's review format from Gerrit.

Thanks for your patience with my reviews, I'm still getting used to GitHub's review format from Gerrit.

No worries, take your time. There is not reason to rush. Thank you for your reviews.
I have just fixed your last rewiews.

Thank you for your time, please tell me if you need something else from me.
By the way, just as a reminder, FUEL_GAUGE_INIT will need to be added once it is ready.

By the way, just as a reminder, FUEL_GAUGE_INIT will need to be added once it is ready.

https://github.com/zephyrproject-rtos/zephyr/pull/55887 will probably merge fairly quick.

please tell me if you need something else from me.

Main things I see blocking a merge are:

One more +1 from another contributor, probably teburd.
Rebase commits in branch to remove squash fixup commits for a cleaner history
Rebase commits to remove all merge commits (Zephyr does rebasing over merging for a linear commit history)

I did the rebase stuff and also added the CONFIG_FUEL_GAUGE_INIT
Now I am dealing with all the style faults to pass all the workflows

Ok now my code passes the compliance checks although there is an error related to "ZEPHYR_LIBLC3_MODULE" but I thinkg that this not related to me.


How to quiz only for the last stroke of a character?

The context
I'm currently learning the Wubi input method (a shape-based input method for Chinese characters). In this input method, some characters requires identifying the last stroke of a character to determine one of the key pressings. You can read more about such characters in this section of a guide written in English (search for "last stroke" for jumping to the relevant part)
Because of what I mentioned, I want the hanzi-writer quiz to only test me on the last stroke of characters.
What I've tried
I inspected the source code and noticed that _handleSuccess is called when a stroke is correctly drawn, so I thought that I could get the desired behavior by calling _handleSuccess repeatedly until the last stroke is to be drawn and change the color of the correctly drawn strokes to the same color of the outline (so that the last stroke is not the only one with a different color). See source code below.

Notes
I'd appreciate someone could provide a better alternative for getting this behavior, since my solution implies calling _quiz and _handleSuccess, these both start with an underscore and might be deleted in the future (as stated in this reply by @Chaning).

That's a good point that's hard to do with the library in its current state. Maybe we can add an option to quiz() like quiz({startStroke: 3}) or allow negative numbers to start at the end, like quiz({startStroke: -1 })

:tada: This issue has been resolved in version 3.4.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

@chanind Thanks for the quick response and new release.
For the record, when using v3.4.0, the behavior I was looking for can be obtained as shown in the minimal working example below.


feat: Show only roles that match with account alias

When source profiles are defined in config only roles that match the sources account alias are shown in popup.

recursivly get target_role_name from first source profile
recursivly get aws_account_id from last source profile
extracted mapping of config in popup
fix scrollbar issue on chrome

TODO:

[ ] docs


[clarity/core] Disabled flat button missing style

Describe the bug
I am using the @clr/core package in a React app, when adding the properties action="flat" disabled={true}, the button loses the "flat" style:

How to reproduce
Please provide a link to a reproduction scenario using one of the Clarity Stackblitz templates. Reports without a clear reproduction may not be prioritized until one is provided.
Steps to reproduce the behavior:

Go to https://stackblitz.com/edit/clarity-core-disabled-flat-button?file=index.tsx

Expected behavior
When using clarity classes, it uses the proper style:

Versions
App

React: ^16.8.0
Clarity: 4.0.6

@andresmgot

@andresmgot
I think this is "as intended". All the buttons have the same look when disabled. IIRC, this was from the accessibility team and design. If you need one of the button types to look differently, it can be accomplished with a CSS edit
https://stackblitz.com/edit/clarity-core-disabled-flat-button-xxermr?file=style.css

Thanks for the workaround @mathisscott


[CONTENT REQUEST]: Corrective and preventive actions management (CAPA)in D365 SCM, Quality area

Contact Details
<EMAIL_ADDRESS>Describe the type of article or feature on the Microsoft Learn website that you would like to see in the Dynamics 365 guidance documentation
I found that corrective and preventive actions management (CAPA) in the quality area is not in our documentation. I think I remember documenting this for Ax2012. The document should be there somewhere.
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hej Jesper @Livbjerg,
Thanks for your suggestion! I can't find CAPA mentioned in the official AX 2012 docs (https://learn.microsoft.com/en-us/dynamicsax-2012/appuser-itpro/production-control), nor in the official whitepapers. So might it have been one or more blog posts at the time?


Document how out-of-range inputs are handled

This changed recently so that overflow and underflow consistently return signed
infinity or zero instead of nil.  (Previously, overflow returned nil, underflow
returned zero.)
Among other benefits:

The new behavior distinguishes malformed input (nil) from valid but out-of-range input.
The new behavior preserves the sign of the input
The new behavior is consistent with how floating-point parsing behaves in other langauges

Resolves rdar://76728925

@swift-ci Please smoke test

@swift-ci Please smoke test and merge


[DOC] Add documentation for alerting dashboards and visualizations

Description
Adds new documentation for alerting dashboards and viz
Issues Resolved
META: https://github.com/opensearch-project/alerting-dashboards-plugin/issues/457
Feature proposal: https://github.com/opensearch-project/alerting-dashboards-plugin/issues/458
#2075
POCs: @lezzago, @praveensameneni and @brijos
Checklist

[X] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@vagimeli Please see my comments and changes and let me know if you have any questions. Thanks!

@natebower I accepted your edits and revised text to incorporate your comments.


Problem running DM21 simples

Hello,
why I had this message when I try to run the exemple with the DM21 :
mf._numint = dm21.NeuralNumInt(dm21.Functional.DM21)
INFO:tensorflow:Saver not created because there are no variables in the graph to restore
WARNING:tensorflow:From /home/ali/venv/DM21/lib/python3.8/site-packages/tensorflow_hub/saved_model_lib.py:110: build_tensor_info (from tensorflow.python.saved_model.utils_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.build_tensor_info or tf.compat.v1.saved_model.build_tensor_info.
2022-02-02 13:36:25.141006: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

mf.kernel()
converged SCF energy = -128.870274298183
-128.87027429818272
I use Python V 3.8.10
Tensorflow CPU 2.7.0
machine configuration I5-4300U cpu with out NVIDIA gpu and 8 go ram.
thanks.

The messages are due to DM21 using the TensorFlow 1 API graph rather than TensorFlow 2. They will not affect the calculated results.


Remove unused fastanvil dependency on hematite-nbt

I noticed hematite-nbt in the list of compiled crates and was surprised, since fastnbt does roughly the same. Indeed, it seems to be unused - cargo-udeps agrees, and rg "hematite" doesn't find any mentions of it in the source code.
cargo test on the entire workspace passes both before and after the removal.
That dependency was added by https://github.com/owengage/fastnbt/commit/5151cddf3578cb79b2cbb96cf62cc4a3d0f7b884, a commit with no code changes that adds a benchmark comparing fastnbt and hematite-nbt to the readme, so possibly it was added by accident.

Hi there! You're absolutely right. I must have forgotten to remove it when trying to benchmark it alongside fasnbt.
Thanks for your contribution. :)


Android subscriptions upgrade, downgrade and change

Fixes #26
Changes Proposed in this pull request:
New UpgradePurchasedSubscriptionAsync function is implemented for Android. It uses similar interface as #192 but implementation works fine with latest api. Implementation for iOS is not necessary, because iOS support upgrades/downgrades itself. I didn't check UWP.

@jamesmontemagno Hello, is there a chance to merge this pull request (or any other Android subscription update implementation)? If so, when?

@jamesmontemagno Hello, any update here? :)

@jamesmontemagno Hello, any update here? :)
I too am interested in getting this functionality. Thank you.

If this can be rebased on the latest and updated to the latest android billing which is now used I will pull it in.

I will check everything with latest version asap.

@jamesmontemagno I've created new pull request, this time compatible with Google Play Billing Library 4.0.0. Checked this new implementation in my own app and it seems to works perfectly.


feat: expand API on generalized eigenspaces of linear endomorphisms

The main changes are:

Module.End.independent_generalizedEigenspace: generalized eigenspaces are independent. This generalizes the old Module.End.eigenspaces_independent which becomes a one-line corollary (and furthermore now requires only NoZeroSMulDivisors R M rather than Field K); the old proof is deleted.
The file LinearAlgebra.Eigenspace.IsAlgClosed is renamed to LinearAlgebra.Eigenspace.Triangularizable
Module.End.Triangularizable: a new definition
Module.End.IsTriangularizable.isTriangularizable_restrict: if an endomorphism is triangularizable, so is its restriction to any invariant submodule

Split out from #7963

This is the not the definition I was expecting for IsTriangularizable. Instead, I was expecting: "there exists a maximal chain of invariant subspaces". Over a finite dimensional vector space over a field, the definitions coincide, but not in the infinite dimensional setting. Thoughts?

This is the not the definition I was expecting for IsTriangularizable. Instead, I was expecting: "there exists a maximal chain of invariant subspaces". Over a finite dimensional vector space over a field, the definitions coincide, but not in the infinite dimensional setting. Thoughts?

Great point, I should have thought of this myself! I'm already yak shaving to some extent so I'm not sure if I have the appetite to develop the full theory at the moment. A reasonable compromise might be keep these results without taking ownership of the IsTriangularizable name.
Given your remarks, I'll split this PR in two: I think the results about independence should be less controversial.

bors merge


License for use

Hi there. I would like to use the EnhancedCacheService code in my commercial project . Is there a license this code is under or am I free to use this with attribution?
Very useful stuff. Thank you!

Hi @galtroarc,
Thanks for the feedback.
You can feel free to use it, I intended it to be under the MIT license, just forgot to mention...
I will add the license soon.
Enjoy!

Thanks much @yinonavraham .

@yinonavraham if you don't mind @ mentioning me in this issue once you do add the license, I will include it in my code as well.


Fix issue 412 (select with href or child node always sorts nodes and eliminates duplicates)

This pull request derives from #411. So needs to be handled after that.

Fixes #412 for XSLT. (Unfortunately I don't know how to fix it for XQuery.)
The problem is that mode="test:generate-variable-declarations" template generates variable declarations using / operator like this:
<xsl:variable name="d29e1" select="$d29e1-doc/(//e2, //e1, //e1)"/>

With this pull request, the variable is declared like this
<xsl:variable name="d29e1" as="item()*">
   <xsl:for-each select="$d29e1-doc">
      <xsl:sequence select="//e2, //e1, //e1"/>
   </xsl:for-each>
</xsl:variable>

without using /.
Commits

b7bed17b68a1e8e1b7c3bbfb1b70b8bcb6a12cf8 reproduces the problem (Travis, AppVeyor)
f1cfe09a9e68c1d1d386057debf1dcac8a53471d fixes XSLT
92db219e4ae0a1202a9e18b28e11fab95d57bc4b simplifies an expression in one of the tests. The expression had to be weird, before fixing this problem.

@cirulls
Merged this bug fix.
@galtm
#475 has a small conflict with this change in generate-tests-helper.xsl. I think it's easy to resolve.
As written in the initial comment here, the goal of the change is replacing this pattern of variable declaration
<xsl:variable name="d29e1" select="$d29e1-doc/(//e2, //e1, //e1)"/>

with this pattern
<xsl:variable name="d29e1" as="item()*">
   <xsl:for-each select="$d29e1-doc">
      <xsl:sequence select="//e2, //e1, //e1"/>
   </xsl:for-each>
</xsl:variable>

#475 has a small conflict

@AirQuick
OK, I will take a look in the next few days.

#475 has a small conflict with this change in generate-tests-helper.xsl.

@AirQuick
I pushed commit 09219e7c6a264a52dc850e9056d05c9c7d346424 to PR #475. It should be basically a reinsertion of my change into the latest master revision of the file. I had to insert part of my code in a different spot to adapt to your changes.

@galtm
I should have mentioned that xsl:element had been consolidated and thus you would need a tweak after reinsertion. 😎

xsl:element had been consolidated

I should have noticed in any case. I uploaded to #475 a better adaptation to your changes: 428a7116e8a7072f377bd9cd01dacfdb2736426d.


Fix (GitHub Backend): handle race condition in editorial workflow

Fixes https://github.com/netlify/netlify-cms/issues/2634
I found two possible race conditions:

Publishing a branch can delete it before the update entry operation completes, thus attempting to update a non existing branch.
Updating entry status (e.g. moving to 'Ready') can update the metadata with old values (old head sha for the pull request). This can happen if the update status operation reads the metadata before the update entry operation completes, but updates the metadata after the update entry operation completes, thus overriding both the status (which is ok) and the head sha (which is not ok). This results in publishing the entry without the updated content.

I created an async version of the semaphore  that you can await on in an optimistic way.
Optimistic means it will not wait forever (has a default timeout), to avoid blocking forever if someone misuses it.
If it does reach a timeout the lock will be re-initialized.
Also, even if the lock wasn't acquired I decided it might be better to attempt the operation anyway since it might still succeed.

@erezrokah Nice work, a quick one, so if any of the transactional calls take more than 15000 which is the default to complete, we might still have the race condition?

@erezrokah Nice work, a quick one, so if any of the transactional calls take more than 15000 which is the default to complete, we might still have the race condition?

Yes exactly. I'm not sure yet what is the best default for the timeout.
Updating the status and publishing an entry should not take that long. Updating the data of an existing entry is the longest. I can run some tests to measure the timings so we can get a rough estimate and maybe double that value.

Another approach might be to disable the buttons based on the redux state. For example, the save action is setting a isPersisting flag as true,  we can use this flag to disable the status and publish buttons temporary until the save operation is complete.

Another approach might be to disable the buttons based on the redux state. For example, the save action is setting a isPersisting flag as true, we can use this flag to disable the status and publish buttons temporary until the save operation is complete.

I agree, I wasn't sure if disabling buttons is the right approach as it might have a negative effect on the UI for all users and not just ones who are fast to click the buttons.
If we can create the experience that updates are happening in parallel without disabling UI elements to force a sequence of events, the effect on the UI is minimal (and even slightly improves as the toast messages are displayed in order now).

If we can create the experience that updates are happening in parallel without disabling UI elements to force a sequence of events, the effect on the UI is minimal (and even slightly improves as the toast messages are displayed in order now).

It's the parallel updates that are causing the issue. UI wise I don't think there will be any negative effect, there is already a blue line indicator that lets the user know something is happening behind the scenes and can wait on it to finish before clicking another button.

How about doing both? This way we can keep the implementation safe to use, and reflect in the UI that some actions need to finished before starting other ones,

Just read up on the convo - I think it's okay as is for now. @barthc I totally agree that the UI experience of this could be improved, but we have so many irons in the fire I'd rather go for the fast fix. Technically this is just enforcing what the CMS already should be doing. If we want to improve the UI around this let's use a separate PR.


Revert "Make trie structure less memory-hogging (#33668)"

This reverts commit 40e116946d2250b19ec9e2b9888cac8f114056fb.

I disagree with this rationale, because you could cram a more giant string into the trie before, and provoke the same stack overflow. The same 20500-character key string was problematic in the old version in terms of memory, and I'm fairly sure a 41000-character key string would still provoke a stack overflow in the destructor.
If this is deemed to be something that ought to be fixed (which I disagree with - a silly enough test input can always provoke resource-exceeded errors, and this is not a reason to prevent changes), I would prefer to fix forward by adding a special recursion-short-circuiting destructor, rather than revert to a version that still has the same problem just at a different silly level of input, plus other problems!

Agreed, thanks @ravenblackx! With testing more, we should move forward with new fixes.


Better shutdown

Only the last commit is relevant here, as the others are from #13
I'll rebase this PR onces #13 is merged.
This basically removes all the foo.kill. It looks like "it works" but I didn't give it a lot of testing.
By the way, does https://github.com/Silex/mjpeg-relay/blob/217904d862cade494d031667d9e30884a9e1e34d/relay.py#L26 really make sense? I know it works, but theorically how can quit() access global variables here? I guess I don't know python enough :stuck_out_tongue_closed_eyes:
I think it's simpler to move the quit() body at the bottom of the try block, and remove the quit() calls. There's no real need to have multiple exit paths.
I was thinking of refactoring a bit more and replacing the foo.connected thing with a function instead, that way we can get rid of the variable and the check is always accurate (simply return the socket state).
Also, each of these "servers" should have a saner start/stop mechanism. At the moment the thread thing for each of them is a bit weird... not the thread in itself but its permanence. I think in general, "start" should start listening/open the socket and spawn a thread, and stop should close the socket/server and kill the thread.
I'll see what I can do, and ping you when I have something. Give me your thoughts in the meantime :wink:
p.s: you code on windows? I was a bit surprised by the windows line endings.

Regarding foo.kill please see my comment on the code.
quit() works but I suppose it should mark the variables as global scope. A better solution is to just pass them as parameters!
Making foo.connected a function makes sense, that way we can get the true value of the socket like you say.
And I agree, the start/stop needs a re-think :)
P.S. yes I do - I love Linux and I'd switch in a heartbeat, but sadly a lot of my programs run on Windows only. One day :)


Random version in a transitive dependency

Applied in a subproject
// subproject/build.gradle.kts
id("com.squareup.sort-dependencies") version "0.1"

Stacktrace:
* What went wrong:
Execution failed for task ':gradle-extensions-subprojects:gradle-delegated-properties-extensions:sortDependencies'.
> Could not resolve all files for configuration ':gradle-extensions-subprojects:gradle-delegated-properties-extensions:detachedConfiguration5'.
   > Could not find com.squareup:sort-gradle-dependencies-app:<IP_ADDRESS>30.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/squareup/sort-gradle-dependencies-app/<IP_ADDRESS>30/sort-gradle-dependencies-app-<IP_ADDRESS>30.pom
       - https://dl.google.com/dl/android/maven2/com/squareup/sort-gradle-dependencies-app/<IP_ADDRESS>30/sort-gradle-dependencies-app-<IP_ADDRESS>30.pom
       - https://plugins.gradle.org/m2/com/squareup/sort-gradle-dependencies-app/<IP_ADDRESS>30/sort-gradle-dependencies-app-<IP_ADDRESS>30.pom
       - https://maven.pkg.jetbrains.space/public/p/compose/dev/com/squareup/sort-gradle-dependencies-app/<IP_ADDRESS>30/sort-gradle-dependencies-app-<IP_ADDRESS>30.pom
     Required by:
         project :gradle-extensions-subprojects:gradle-delegated-properties-extensions

The workaround is loading it on root too:
// build.gradle.kts
id("com.squareup.sort-dependencies") version "0.1" apply false

Thanks for the issue. Do you have a minimal reproducer?

Sorry @autonomousapps, a lot of time has passed and I don't remember the features, I think it was a normal Kotlin (or Android with Kotlin) project.
I think I was using Spotless
which is doing something with configurations eagerly, I have been issues with that and forcing to add the plugin to the root project.

Thanks @JavierSegoviaCordoba. I'm going to close this as non-reproducible for now, but feel free to open if you run into it again. I'll be cutting a new release soon with some important fixes.

I've run into this same issue. I'll see if I can create a reproducer. I see it trying to fetch a version that looks to be the same as the sonar plugin we are using.

I was about to hack together a reproducer from a repo I created for a recent talk. See https://github.com/kyhule/polyworld-app/tree/reproduce-bad-dep-sort-version.
* What went wrong:
10 actionable tasks: 10 executed
Execution failed for task ':app:checkSortDependencies'.
> Could not resolve all files for configuration ':app:detachedConfiguration9'.
   > Could not find com.squareup:sort-gradle-dependencies-app:<IP_ADDRESS>29.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/squareup/sort-gradle-dependencies-app/<IP_ADDRESS>29/sort-gradle-dependencies-app-<IP_ADDRESS>29.pom
       - https://repo.maven.apache.org/maven2/com/squareup/sort-gradle-dependencies-app/<IP_ADDRESS>29/sort-gradle-dependencies-app-<IP_ADDRESS>29.pom
     Required by:
         project :app

https://github.com/kyhule/polyworld-app/actions/runs/5591602973/jobs/10222909893#step:6:1533
It cannot be a coincidence that the version it tries to resolve is the same as the sonar version here.

Thanks! That'll help a lot.

@autonomousapps Let me know if I can help in any other way. I can take a look at what you suspect is the problem.
Also, if it is what you suspect, probably worth raising a ticket in sonar gradle plugin to have them namespace theirs as well. Would you agree?

@kyhule maybe! But let me see if I can reproduce it on my end first. I'll respond here once I've done so.

ka-ching, I was right. This is from the IDEA debugger. There are two resources with the same name, and the sonar one just happens to be picked first (probably for classpath reasons). The simplest solution will be to namespace the resource to make it harder to get clobbered. Probably worth notifying the Sonar people too.


Mixed Content: Unable to serve correctly over https

Mixed Content: The page at 'https://myhost.com/rq/' was loaded over HTTPS, but requested an insecure stylesheet 'http://myhost.com/rq/static/css/main.css'. This request has been blocked; the content must be served over HTTPS

I believe the line
https://github.com/Hannes221/rq-dashboard-fast/blob/7a78db0c448b56e7810ca51b80b2dad841907b94/rq_dashboard_fast/templates/base.html#L8
Needs to change to below to fix the mixed content issue.
<link rel="stylesheet" href="/static/css/main.css"/>

Are you running a proxy?

Are you running a proxy?

On Kubernetes behind ingress nginx controller

Should be fixed in v0.3.8

Are you running a proxy?

I am running mine behind an apache proxy. Assets are not able to load; I see this in the console:
GET https://localhost:8012/rq/static/css/main.css net::ERR_CONNECTION_REFUSED Instead of using my domain or the proxy, it is just trying to always server under localhost, which will always fail. Any ideas on how to fix this? @Hannes221


RFE: sonobuoy gen --plugin

Describe the solution you'd like
Make it easier to roll in your plugin into the (run & gen)

Duplicate of #405