Skip to content

Fix for parsing existing config in --embedded mode after #495#498

Merged
sbc100 merged 1 commit into
masterfrom
fix_config_parsing
May 8, 2020
Merged

Fix for parsing existing config in --embedded mode after #495#498
sbc100 merged 1 commit into
masterfrom
fix_config_parsing

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented May 8, 2020

Ooops, I guess even the most innocent-seeming change can have
unintended consequences. Switching to embedded by default will at
least make this path more tested in the future.

Fixed #497

Ooops, I guess even the most innocent-seeming change can have
unintended consequences. Switching to embedded by default will at
least make this path more tested in the future.

Fixed #497
@sbc100 sbc100 requested a review from kripken May 8, 2020 17:30
Comment thread emsdk.py
dot_emscripten_key = dot_emscripten[key].replace("' + emsdk_path + '", emsdk_path())
# If running in embedded mode, all paths are stored dynamically relative
# to the emsdk root, so normalize those first.
dot_emscripten_key = dot_emscripten[key].replace("emsdk_path + '", "'" + emsdk_path())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this still looks weird to me even with the explanation from before... it's shifting a ' from the right to the left. That seems really surprising.

Can't this just replace ' emsdk_path ' (note the space before and after) with the path?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we also want to replace the += part.

Old:

FOO = emsdk_path + "/some/path"

New:

FOO = "/the/actual/path/some/path"

I can probably come up with a cleaner way to do this overall, but for now this fixes the immediate breakage and I don't think its any nicer before of after this change, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see better now, thanks!

@sbc100 sbc100 merged commit f5e21de into master May 8, 2020
@sbc100 sbc100 deleted the fix_config_parsing branch May 8, 2020 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

construct_env with activate --embedded won't list paths to node and upstream/emscripten

2 participants