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

Heavyweight vergen #503

Closed
stefnotch opened this issue Aug 19, 2023 · 3 comments · Fixed by #533
Closed

Heavyweight vergen #503

stefnotch opened this issue Aug 19, 2023 · 3 comments · Fixed by #533

Comments

@stefnotch
Copy link
Contributor

stefnotch commented Aug 19, 2023

So I updated my chumsky, and noticed that my lockfile suddenly gained around 1000 new lines.
Apparently vergen causes the extra dependencies. 136f882

image

I'm not worrying too much about it, since the (from scratch) compile times for me are still pretty fast, but I figured I'd let you know.

@stefnotch
Copy link
Contributor Author

stefnotch commented Aug 19, 2023

It might be possible to put vergen into its own feature, and then use https://docs.rs/about/metadata to specify --features ....
That way, vergen would only do its magic on docs.rs.

(The alternative of using cfg(doc) doesn't seem to be a thing at the moment.)

A more ideal solution would might be something like rust-lang/docs.rs#132 or maybe messing around with Rustdoc's scrape-examples feature.

@zesterer
Copy link
Owner

Thanks, this is useful to know. I'll try to get some time to sort this out in a nicer way when I'm back in a week.

@stefnotch
Copy link
Contributor Author

Ooh, chumsky already uses a funny trick to make cfg(docsrs) work. Then making vergen an optional dependency that only gets activated when docsrs is a thing should work.

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 a pull request may close this issue.

2 participants