Closed jD91mZM2 closed 1 year ago
CI is broken because of the git dependency, I think you had a patch to carnix for that?
Interesting, I have to take a more detailed look at what this actually implies, but I have two superficial comments:
#[macro_use]
annotation, nixdoc
should build on NixOS stable which does not have the Rust version that drops this requirement.refactor: Use rowan-based rnix dependency
with a body explaining the changes a little bit). I like keeping this uniform so people can see what is going on on a high-level without having to read through PRs.CI is broken because of the git dependency, I think you had a patch to carnix for that?
Yep, carnix
keeps some of the query parameters appended by cargo
in the git URL and nix-prefetch-git
then fails to clone the repository.
Based on my carnix devel branch, the (kinda brute-force) patch is:
diff --git a/src/prefetch.rs b/src/prefetch.rs
index 0078cb4..dab20c2 100644
--- a/src/prefetch.rs
+++ b/src/prefetch.rs
@@ -182,6 +182,9 @@ impl Crate {
println!("Prefetching {} ({})", self.name, cached_url);
debug!("cached_url = {:?}", cached_url);
+
+ let url = url.split("?").next().unwrap();
let prefetch = Command::new("nix-prefetch-git")
.args(&[ "--url", url, "--rev", rev ])
.output();
Closed by #36.
:heart:
Don't merge yet.
I'm currently exploring a library called "rowan" in rnix, which supplies a builder for ASTs making the code prettier, but also makes comments completely separate tokens. Sadly this library is currently slower because it's not using an arena-based approach, but that should hopefully be possible to do in rowan without modifying rnix or this project. Eventually this will become the main version of rnix, so I fixed this project now :smile: