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

Rename either --cfg procmacro2_unstable or --features proc-macro2/unstable #42

Closed
dtolnay opened this issue Jan 2, 2018 · 5 comments
Closed

Comments

@dtolnay
Copy link
Owner

dtolnay commented Jan 2, 2018

These are basically orthogonal flags so it is confusing to give them such similar names. Someone may want to use procmacro2_unstable without proc-macro2/unstable to get the emulation of line and column from #36 on the stable compiler, or may want to use proc-macro2/unstable without procmacro2_unstable to get real spans without the semver-exempt APIs.

@alexcrichton
Copy link
Contributor

How about changing the Cargo feature to nightly or rustc-nightly?

@dtolnay
Copy link
Owner Author

dtolnay commented Jan 3, 2018

👍 for either of those. I might go with --cfg procmacro2_semver_exempt and --features proc-macro2/nightly.

Want me to do proc-macro2 0.2 with a semver-trick to bridge 0.1's unstable feature to 0.2's nightly feature? Or go to 0.2 without a semver-trick? Or just make both changes in 0.1 because :shipit:?

@mystor
Copy link
Contributor

mystor commented Jan 3, 2018

Yeah - sorry about the bad naming. I wasn't a big fan of it at the time either :-/.

I called it procmacro2_unstable to match the rayon_unstable cfg flag which rayon uses: https://github.com/rayon-rs/rayon#semver-policy-the-rayon-core-crate-and-unstable-features

@alexcrichton
Copy link
Contributor

@dtolnay I'd personally be ok with just shipping everything in 0.1 (e.g. just commenting that a feature is disabled in Cago.toml), and I'd be fine to rename the --cfg whenever!

@alexcrichton
Copy link
Contributor

(also the names you proposed seemed fine by me, if you're gonna send a PR feel free to decide!)

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

No branches or pull requests

3 participants