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

Add more rust_private attributes #56559

Closed
wants to merge 1 commit into from

Conversation

ljedrz
Copy link
Contributor

@ljedrz ljedrz commented Dec 6, 2018

I'm working on enabling clippy in x.py and the usage of is_xid_start and is_xid_continue in the components is one of the obstacles. If we are not planning to remove this attribute then it makes sense to use it for these compiler internals, as it is already done with some of the others.

If for any reason this is undesirable, there is probably some way of working around it; otherwise it seems like the most straightforward option.

r? @alexcrichton

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 6, 2018
@ljedrz ljedrz changed the title Add rust_private attrib to rustc, macros and syntax Add more rust_private attributes Dec 6, 2018
@alexcrichton
Copy link
Member

I think this is probably indicative of other problems perhaps? These attributes shouldn't be necessary due to how rustbuild builds the compiler crates, and this attribute would otherwise be needed by a much larger number of crates.

I think that clippy integration into rustc will be somewhat difficult, but it'll likely for sure need some tight integration with rustbuild itself!

@ljedrz
Copy link
Contributor Author

ljedrz commented Dec 6, 2018

I am trying an approach similar to check (since it's not an issue there); I'm wondering if it has something to do with the cargo process run from within clippy, but the arguments I've tried to "smuggle in" so far (RUSTC_FORCE_UNSTABLE and RUSTC_BOOTSTRAP) didn't do the trick.

@ljedrz
Copy link
Contributor Author

ljedrz commented Dec 7, 2018

@alexcrichton An additional effect of this change is the improved ability to execute cargo (clippy/fix) on rustc crates individually; this is desirable if we want to keep them as modular as possible. For example, it allows cargo fix --edition to automatically migrate libproc_macro to the 2018 edition.

@alexcrichton
Copy link
Member

Is this still necessary or has it largely moved over to #56595?

@ljedrz
Copy link
Contributor Author

ljedrz commented Dec 10, 2018

It is still needed in order for all components to work with x.py clippy with the other PR, but I kept it separate in case there is a better way to achieve this. This PR is also useful on its own, as mentioned in the previous comment.

@alexcrichton
Copy link
Member

Hm well as I mentioned before these feature gates should not be necessary, and indicates a bug in the build setup if they're otherwise required. I haven't had a chance to dig into the other PR yet, but if it requires this one then I think that the other PR needs some more work

@bors
Copy link
Contributor

bors commented Jan 9, 2019

☔ The latest upstream changes (presumably #56614) made this pull request unmergeable. Please resolve the merge conflicts.

@TimNN
Copy link
Contributor

TimNN commented Jan 29, 2019

ping from triage @alexcrichton: Could you clarify you previous review? Is this PR entirely infeasible or just needs some additional work?

@alexcrichton
Copy link
Member

Oh sorry sure, this PR shouldn't be necessary (and we're building just fine AFAIK today), so I think there may have been something local giong wrong? In any case I'll go ahead and close.

@ljedrz ljedrz deleted the more_rustc_private branch February 18, 2019 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants