-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
[PoC] Replace libcargo with cargo CLI #70
Conversation
While I'm not too bothered by compilation time of the Main motivation to use I tried to compiling $ cargo clean
$ cargo build --release -p foo # this will compile foo and everything it needs
$ cargo asm -p foo bar # this will compile only foo Behavior with $ cargo clean
$ cargo build --release -p foo # this will compile foo and everything it needs
$ cargo asm -p foo bar # this will compile foo and everything it needs In my case it's up to extra ~ 900 crates to compile and takes a while. Subsequent calls to I think this is caused by |
Current version uses |
You use "roughly" and that's true. The bundled lib
Oh, that's because I don't forward |
I see... Current version uses |
Anyway, let's try to get rust source annotation working and make sure it reuses the results as previously. Please let me know if I can help you with anything. |
I implemented Also I noticed that |
Running Linux as well, but I have configured the CI to run Windows and it seems to be doing the right thing. I think the easiest way to test if it works on Windows too would be to adjust the CI to generate multiple files - probably by running it once, changing the file and running it again? I can look into that tomorrow.
Removing is fine, if someone asks for it back I'll implement it using |
escargot might be worth taking a look at |
Tried that and I'm not sure how to trick @oxalica Is there anything you are planning to add to this MR or should I proceed with testing/merging? |
Changing definitions of |
I totally forgot about |
As far as I understand it is a bit more limited but user friendly version of spawning cargo commands directly. If that's the case I can try swapping it later, doesn't have to be in this MR. |
Okay, looks like currently it can't deal with multiple files on Windows either, but works on Linux so as long as it runs in Linux - it's a feature parity at least :) @oxalica Can you rebase your branch on top of |
Did it myself, it works. |
🤔 Oops, don't expect to be so eager. Just had a day break. I think we should at least add a content comparison fallback for is_same_file here Other code should be complete. |
Mostly so I can keep pushing my changes on top of that, not going to publish it until everything is complete.
It seems to be doing the right thing on Windows in CI. If you think it's important - feel free to throw one more pull request.
Great 👍 |
@oxalica Thank you very much for your contribution. New code is both faster to compile and it solved some issues with Windows in CI. I did some cleaning up and published it as 0.2.0 along with some breaking changes to command flags. |
#82 - looks like there's something strange going on with Mystery solved, |
Fixes #69
This PR is an incomplete draft for more discussion.
--lib
,--test
,--bench
,--package
selectors, and auto-selection are implemented. Asm paths are constructed precisely without guessing.--bin
,--example
are not implemented, which need file searching and guessing. We could construct asm paths using unstable--build-plan
arguments but not sure that's acceptable.--bin
,--example
are implemented by tracking hard-links to get the asm file name.Implemented.--release
,--dry-run
and etc flags should be trivial by passing-through. They are not implemented yet to focus on the overall approach.Currently we use some kind of guessing for extra-filenames (the hash part in filename), which may need
cargo clean
before the run. It's kind of annoying to clean artifacts for a big project.