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

Use our new syntax extension loading machinery to remove the hardcoded macros in libsyntax #11763

Closed
bstrie opened this issue Jan 23, 2014 · 4 comments
Labels
A-syntaxext Area: Syntax extensions

Comments

@bstrie
Copy link
Contributor

bstrie commented Jan 23, 2014

< bstrie_remorse> now that we have loadable syntax extensions, are we actually
                  using them for e.g. println! or are we still hardcoding those
                  into libsyntax?
<@acrichto> not yet
<@acrichto> not yet using them
<@acrichto> I don't think there's a blocker for using them though

We've got a lot of syntax extensions hardcoded into src/libsyntax/ext. That shouldn't be necessary anymore. Fix this terrible hack!

@sfackler
Copy link
Member

Pulling the procedural macros out (format, bytes, etc) will require some thought to get it to bootstrap properly. The macro_rules macros should be easily extractible. #11720 is a blocker imo, but it should be merging in today.

sfackler added a commit to sfackler/rust that referenced this issue Jan 24, 2014
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes rust-lang#2247
cc rust-lang#11763
bors added a commit that referenced this issue Jan 25, 2014
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes #2247
cc #11763
nathanielherman pushed a commit to nathanielherman/rust that referenced this issue Jan 30, 2014
They all have to go into a single module at the moment unfortunately.
Ideally, the logging macros would live in std::logging, condition! would
live in std::condition, format! in std::fmt, etc. However, this
introduces cyclic dependencies between those modules and the macros they
use which the current expansion system can't deal with. We may be able
to get around this by changing the expansion phase to a two-pass system
but that's for a later PR.

Closes rust-lang#2247
cc rust-lang#11763
@steveklabnik
Copy link
Member

While this situation isn't perfect, @sfackler has moved the macros out of libsyntax and into libstd.

@steveklabnik steveklabnik added the A-syntaxext Area: Syntax extensions label Jan 23, 2015
@steveklabnik
Copy link
Member

Triage: I am not aware of any more changes on this front.

@bstrie
Copy link
Contributor Author

bstrie commented Jul 14, 2016

I'm content to close this now, what's left is just cleanup work.

@bstrie bstrie closed this as completed Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions
Projects
None yet
Development

No branches or pull requests

3 participants