Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmdlineparser #976

Merged
merged 2 commits into from
Oct 16, 2022
Merged

Cmdlineparser #976

merged 2 commits into from
Oct 16, 2022

Conversation

sydow
Copy link
Collaborator

@sydow sydow commented Oct 16, 2022

Fixes #893

@sydow
Copy link
Collaborator Author

sydow commented Oct 16, 2022

After two stupid mistakes I now arrived at the failures I experienced before pushing. One test case fails, and I canot understand why. I certainly can do the following:

qualified_root> pwd
/Users/sydow/acton/compiler/test/actonc/project/qualified_root
qualified_root> actonc build --root test.main
Building project in /Users/sydow/acton/compiler/test/actonc/project/qualified_root
Compiling b.act for release
Already up to date, in 0.001 s
Compiling test.act for release
Already up to date, in 0.000 s
Building executable out/rel/bin/test

which seems to me to be the test that fails. I can't get further with this.

@plajjan
Copy link
Contributor

plajjan commented Oct 16, 2022

The test is wrong. The function buildThing checks if a "thing" is an acton project or a single .act source file and builds accordingly. If it's a project, it compiles the project by running actonc build, i.e. buildThing adds the build argument and sets the working directory to the project.

In this case, the test case itself sets arguments to build --root test.main so the final cmd args to actonc become build build --root test.main.

sydow and others added 2 commits October 17, 2022 00:32
buildThing function already figures out this is a project and then
injects the build argument to actonc, so we shouldn't add it a second
time!
@plajjan
Copy link
Contributor

plajjan commented Oct 16, 2022

I squashed the two extra commits... and added a fix.

@plajjan plajjan merged commit b5faa11 into main Oct 16, 2022
@plajjan plajjan deleted the cmdlineparser branch October 16, 2022 22:39
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.

Rework acton compiler argument parsing to use sub-parsers for commands
2 participants