-
Notifications
You must be signed in to change notification settings - Fork 11
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
cargo-marker: add git support #126
Conversation
This is awesome, I was super happy when I saw the notification! I haven't taken a look at it yet, I'll do so next week :) |
That is super cool! I'm not 100% sure if git dependencies work for crates we want to push to crates.io. But if that becomes a problem, we could move it to here or publish it. Let me know if you need any help with the maintenance! |
Oh I know, that's why I've published it ;) |
1a6c420
to
00a363a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm honestly impressed. Thank you very much for all the work you put into this, even making a new library. This is so much more than I hoped!
I still want to do some small tests before merging it, but currently everything looks, awesome!
Btw, do you have a lint/repo, that you tested this implementation with? Otherwise, I might look into adding a repo to rust-marker
and hacking a test together :)
Btw, let's make sure it runs everywhere: bors try |
tryBuild succeeded: |
Yeah some tests would be great, but yes, I've tested locally with the marker repo itself, you can just do: [workspace.metadata.marker.lints]
marker_lints = { git = "https://github.com/rust-marker/marker" } in the Cargo.toml, and it should fetch the test lints from the repo |
Hey, I finally found some time to test this. Sorry, for my inactivity. My semester will end in about one month and then I'll have more time, also to (hopefully) make the final push for v0.0.1. Anyways, I see what you mean, that the compile time increased significantly. In the future, I would be in favor of having such a functionality in Cargo itself, there is already an issue for that. However, in the meantime, this is the best solution I can think of, and I'm really grateful that you created the library ❤️ Now, related to testing: I've reserved the I've tested the implementation locally. The git fetching works 🎉 However, the normal path dependency: [workspace.metadata.marker.lints]
marker_lints = { path = "marker_lints" } is sadly broken. I get the following error when running $ c clean
# (Yes, I have an alias cargo, and I can highly recommend it xD)
$ c dogfood
Compiling proc-macro2 v1.0.49
[..]
Compiling cargo_marker v0.1.0 (./marker/cargo-marker)
Finished dev [unoptimized + debuginfo] target(s) in 59.85s
Running `target/debug/cargo-marker --forward-rust-flags`
Compiling rustc driver
Compiling proc-macro2 v1.0.49
[...]
Compiling marker_driver_rustc v0.1.0 (./marker/marker_driver_rustc)
Finished dev [unoptimized + debuginfo] target(s) in 7.38s
Compiling Lints:
Failed fetching lint crates: invalid path url `marker_lints`
Error: LintCrateFetchFailed Could you take a look at this? :) Once that is fixed, the PR is ready to be merged. |
No problem, I'm not rushing, I have other things to deal with myself.
Yeah the library seems like a hacky solution, and I would like to see it in the cargo too, but this works for now :p
Nice catch, funny enough it was a typo ( Everything should be good now I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, this version looks good to me. Thank you!!!
bors r+
126: cargo-marker: add git support r=xFrednet a=Niki4tap Its been a while since I've worked on this, but I've finally took the time to finish it. This PR adds git support to marker so this now works: ```toml [workspace.metadata.marker.lints] marker_lints = { git = "https://github.com/rust-marker/marker" } ``` It makes use of [`cargo_fetch`](https://github.com/Niki4tap/cargo_fetch) library which I made for this specific use-case, which is essentially just a thin wrapper around `cargo` library (so the builds are now way slower :p). I'll try to maintain the library to my best capacity, and prioritize marker's goals whenever needed. Addition of the library also technically allows for any kind of package to be downloaded, so this also *technically* supports registries, though this PR does not implement it, because this is blocked on marker APIs being released. --- In total this checks out... *\*looks up the issue\**... one task from #81! But also *technically* closes <!-- do not close this issue github please --> #87 whenever APIs are published. review side note: most changes are from `Cargo.lock` Co-authored-by: Niki4tap <rombiklol2@gmail.com>
This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried. Additional information: Response status code: 422
{"message":"Validation Failed","documentation_url":"https://docs.github.com/articles/about-protected-branches"} |
Looks like my tests with merge queues broke bors 😅 Now it should work again bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
Its been a while since I've worked on this, but I've finally took the time to finish it.
This PR adds git support to marker so this now works:
It makes use of
cargo_fetch
library which I made for this specific use-case, which is essentially just a thin wrapper aroundcargo
library (so the builds are now way slower :p).I'll try to maintain the library to my best capacity, and prioritize marker's goals whenever needed.
Addition of the library also technically allows for any kind of package to be downloaded, so this also technically supports registries, though this PR does not implement it, because this is blocked on marker APIs being released.
In total this checks out... *looks up the issue*... one task from #81!
But also technically closes #87 whenever APIs are published.
review side note: most changes are from
Cargo.lock