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

html5ever failing to compile on perf #53495

Closed
Mark-Simulacrum opened this issue Aug 19, 2018 · 6 comments · Fixed by #53653
Closed

html5ever failing to compile on perf #53495

Mark-Simulacrum opened this issue Aug 19, 2018 · 6 comments · Fixed by #53653
Assignees
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name resolution regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

html5ever is failing to compile in perf with this error; I'm not sure if this is something we need to fix in source or if it's a regression.

cc @petrochenkov

error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
  --> /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/string_cache-0.2.29/src/lib.rs:71:13
   |
71 |     pub use atom;
   |             ^^^^
   |
note: the macro is defined here
  --> /tmp/.tmpFazpQK/target/debug/build/string_cache-589ae806702507d8/out/atom_macro.rs:2:1
   |
2  | / macro_rules! atom {
3  | | (\"sdev\") => { $crate::Atom { unsafe_data: 0x2 } };
4  | | (\"onstart\") => { $crate::Atom { unsafe_data: 0x100000002 } };
5  | | (\"overflow\") => { $crate::Atom { unsafe_data: 0x200000002 } };
...  |
127| | (\"stroke-miterlimit\") => { $crate::Atom { unsafe_data: 0x4f400000002 } };
127| | }
   | |_^

error: aborting due to previous error
@Mark-Simulacrum Mark-Simulacrum added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 19, 2018
@petrochenkov
Copy link
Contributor

Unfortunately, this restriction is necessary for #52234 to work soundly without causing much worse issues like #53053 (comment).
The best short-term solution is to fix this in source.

@petrochenkov
Copy link
Contributor

This is an expected "can't make an omelette" regression from enabling macro modularization, more or less.
string_cache-0.2.29 was unlucky to hit a very specific set of circumstances under which this new error has to be reported.

@petrochenkov
Copy link
Contributor

petrochenkov commented Aug 19, 2018

Hmm, I think we can report this error as a deprecation lint for some time though.

@petrochenkov petrochenkov self-assigned this Aug 19, 2018
@petrochenkov petrochenkov added A-resolve Area: Name resolution A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Aug 19, 2018
@alexcrichton alexcrichton added this to the 1.30 milestone Aug 21, 2018
@Mark-Simulacrum
Copy link
Member Author

Leaving this open to track the compat lint fix.

@Mark-Simulacrum
Copy link
Member Author

Hm, so the atom macro and the atom module are public API for the string-cache crate so it's unclear to me that we can easily fix this in source unless I'm missing something -- @petrochenkov, do you have any guidance on the best way to apply a fix?

@petrochenkov
Copy link
Contributor

Turned into a deprecation lint in #53653

bors added a commit that referenced this issue Aug 24, 2018
Address two regressions

Remove assert checking that expansion data is immutable until I have time to investigate why it's firing, cc #52363
Turn the error for module-relative access to macro-expanded `macro_export` macros into a deprecation lint, closes #53495
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) A-resolve Area: Name resolution regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants