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

Rustpkg doesn't expand macros in pkg.rs #7348

Closed
dcolish opened this issue Jun 24, 2013 · 4 comments
Closed

Rustpkg doesn't expand macros in pkg.rs #7348

dcolish opened this issue Jun 24, 2013 · 4 comments

Comments

@dcolish
Copy link

dcolish commented Jun 24, 2013

With a custom pkg.rs that includes macros, the compiler will fail to expand macros correctly,

WARNING: The Rust package manager is experimental and may be unstable
rust: task failed at 'attempted to analyze unexpanded stmt', /home/dcolish/workspace/rust/src/libsyntax/ast_util.rs:46
/home/dcolish/local/rust/trunk/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f6a19c7405b]
/home/dcolish/local/rust/trunk/bin/../lib/librustrt.so(+0x2d469)[0x7f6a19c85469]
/home/dcolish/local/rust/trunk/bin/../lib/librustrt.so(upcall_fail+0x1a0)[0x7f6a19c760f0]
/home/dcolish/local/rust/trunk/bin/../lib/libstd-6c65cf4b443341b1-0.7-pre.so(_ZN3sys13begin_unwind_16_89e154cd09156716_07preE+0x2e4)[0x7f6a1d3f9554]
/home/dcolish/local/rust/trunk/bin/../lib/libstd-6c65cf4b443341b1-0.7-pre.so(+0x1166b2)[0x7f6a1d3f96b2]
/home/dcolish/local/rust/trunk/bin/../lib/libstd-6c65cf4b443341b1-0.7-pre.so(+0x116191)[0x7f6a1d3f9191]
/home/dcolish/local/rust/trunk/bin/../lib/libstd-6c65cf4b443341b1-0.7-pre.so(+0x11666c)[0x7f6a1d3f966c]
/home/dcolish/local/rust/trunk/bin/../lib/libstd-6c65cf4b443341b1-0.7-pre.so(+0x116191)[0x7f6a1d3f9191]
/home/dcolish/local/rust/trunk/bin/../lib/libstd-6c65cf4b443341b1-0.7-pre.so(+0x7d5e4)[0x7f6a1d3605e4]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(_ZN7ast_map8map_stmt16_ca2ca8876527a9a6_07preE+0xe0)[0x7f6a1c8ccb10]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(+0xe5d45)[0x7f6a1c8d3d45]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(_ZN7ast_map9map_block17_8469195a50a296636_07preE+0x25e)[0x7f6a1c8cd50e]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(+0xe9640)[0x7f6a1c8d7640]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(_ZN7ast_map6map_fn17_67fd9b1b17822b2e6_07preE+0x233)[0x7f6a1c8cd093]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(+0xe4727)[0x7f6a1c8d2727]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(_ZN7ast_map8map_item17_dbfe9115952df58e6_07preE+0x11de)[0x7f6a1c8cbbce]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(+0xe3ae2)[0x7f6a1c8d1ae2]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(+0xeac9a)[0x7f6a1c8d8c9a]
/home/dcolish/local/rust/trunk/bin/../lib/libsyntax-9c7e57a146ef6bf1-0.7-pre.so(_ZN7ast_map9map_crate17_9012abf71977f3fe6_07preE+0x1a5)[0x7f6a1c8d8545]
/home/dcolish/local/rust/trunk/bin/../lib/librustc-ec14752a4b1d63-0.7-pre.so(+0x8059a0)[0x7f6a1c3019a0]
/home/dcolish/local/rust/trunk/bin/../lib/librustc-ec14752a4b1d63-0.7-pre.so(+0x805383)[0x7f6a1c301383]
/home/dcolish/local/rust/trunk/bin/../lib/librustc-ec14752a4b1d63-0.7-pre.so(_ZN6driver6driver12compile_rest15_9174bc134951036_07preE+0xa08)[0x7f6a1c2fea18]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(+0x81fc2)[0x7f6a1b8bcfc2]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(_ZN14__extensions__10meth_2106010run_custom17_a227f8cd2af32e166_07preE+0xee9)[0x7f6a1b8c7939]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(_ZN14__extensions__10meth_211435build17_a05a867e4ad98b906_07preE+0x733)[0x7f6a1b8cb0a3]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(+0x8f965)[0x7f6a1b8ca965]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(+0x88e1c)[0x7f6a1b8c3e1c]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(_ZN14__extensions__10meth_211383run17_2e1266d531cfa8b96_07preE+0x429)[0x7f6a1b8c97f9]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(+0x97668)[0x7f6a1b8d2668]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(_ZN4main17_952a9ee1229fd18b6_07preE+0x1a53)[0x7f6a1b8d0783]
/home/dcolish/local/rust/trunk/bin/../lib/librustpkg-a039f7e3caed55f-0.7-pre.so(+0x97668)[0x7f6a1b8d2668]
rustpkg(_rust_main+0x2e)[0x400d3e]
/home/dcolish/local/rust/trunk/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x22)[0x7f6a19c74a32]

This can be reproduced with a pkg.rs as simple as this

fn main() {
    let s = "Hello";
    debug!("This will break %s", s);
}
@catamorphism
Copy link
Contributor

I'll take a look.

@ghost ghost assigned catamorphism Jun 24, 2013
@catamorphism
Copy link
Contributor

#7403 should fix this.

@catamorphism
Copy link
Contributor

Testing this as well.

@catamorphism
Copy link
Contributor

#8570 will close this.

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

2 participants