Skip to content

Fix #6047, #5271: Support one-line-one-function file format for asyncify lists - #6051

Merged
kripken merged 1 commit into
WebAssembly:mainfrom
caiiiycuk:main
Oct 30, 2023
Merged

Fix #6047, #5271: Support one-line-one-function file format for asyncify lists#6051
kripken merged 1 commit into
WebAssembly:mainfrom
caiiiycuk:main

Conversation

@caiiiycuk

@caiiiycukcaiiiycuk commented Oct 25, 2023

Copy link
Copy Markdown
Contributor

@codecov

codecovBot commented Oct 25, 2023

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (main@2c0fb8c). Click here to learn what that means.
The diff coverage is n/a.

@@ Coverage Diff @@## main #6051 +/- ##
=======================================
Coverage ? 42.46% =======================================
Files ? 498 Lines ? 75709 Branches ? 11841 =======================================
Hits ? 32147 Misses ? 40409 Partials ? 3153 

@caiiiycuk
caiiiycukforce-pushed the main branch 2 times, most recently from 30eaee8 to 40e0744CompareOctober 25, 2023 07:33
@caiiiycukcaiiiycuk changed the title Fix #6047,5271: Support one-line-one-function file format for asyncify listsFix #6047, #5271: Support one-line-one-function file format for asyncify listsOct 25, 2023

@kripkenkripken left a comment

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.

lgtm with some minor suggestions.

Comment threadsrc/support/string.h
Comment threadsrc/support/string.h
Comment threadsrc/support/string.h
… file format for asyncify lists
Co-authored-by: Alon Zakai <alonzakai@gmail.com>
@caiiiycuk

Copy link
Copy Markdown
ContributorAuthor

@kripken I squashed commits into one. Do you think it is worst to change

needToHandleBracketingOperations = delim != "\n";

into opposite?

needToHandleBracketingOperations = delim == ",";

@kripken

Copy link
Copy Markdown
Member

delim != "\n"; seems better to me, as newlines are special: they are the one case that we can just split naively using them, without scoping/bracketing.

@kripken
kripken merged commit 7dcc532 into WebAssembly:mainOct 30, 2023
@kripken

Copy link
Copy Markdown
Member

@caiiiycuk it looks like this breaks the auto-updater script,

$ ./scripts/auto_update_tests.py lit
[..]
Fatal: Failed opening '%S/asyncify-foo,bar-nl.txt'
[..]
subprocess.CalledProcessError: Command 'binaryen/scripts/foreach.py binaryen/test/lit/passes/asyncify_pass-arg=asyncify-onlylist@foo,bar.wast /tmp/tmptkbv0v5t wasm-opt --asyncify --pass-arg=asyncify-onlylist@@%S/asyncify-foo,bar-nl.txt -S -o -' returned non-zero exit status 1.
[..]
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'binaryen/scripts/update_lit_checks.py', '--binaryen-bin=binaryen/bin', 'binaryen/test/lit/**/*.wast', 'binaryen/test/lit/**/*.wat']' returned non-zero exit status 1.

We should run that in CI, but don't atm, which is how this was missed.

What is %S trying to do there?

@caiiiycuk

caiiiycuk commented Nov 1, 2023

Copy link
Copy Markdown
ContributorAuthor

@kripkenasyncify-foo,bar-nl.txt is located in the same folder as a test. However, if you just name it without specifying %S, it may not work correctly. This is because the current working directory is the root of the project or even some other folder. After briefly checking the documentation, it seems that %S refers to the source directory (the directory of the file currently being run), and this could potentially resolve the issue. I apologize for not testing it in different folders to confirm.

@caiiiycuk

Copy link
Copy Markdown
ContributorAuthor

Ah, it's not related to different folders. I didn't imagine that I could break the auto-update, but now it seems obvious. Sorry

@kripken

Copy link
Copy Markdown
Member

@caiiiycuk I'm not sure I understand, but it sounds like you have an idea of what went wrong here - do you know how to fix it?

@caiiiycuk

Copy link
Copy Markdown
ContributorAuthor

@caiiiycuk
caiiiycuk deleted the main branch November 18, 2023 16:26
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
…mbly#6051)
If there are newlines in the list, then we split using them in a simple manner
(that does not take into account nesting of any other delimiters).
FixesWebAssembly#6047FixesWebAssembly#5271
Sign up for freeto 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.

2 participants

@caiiiycuk@kripken