Skip to content

Monomorphised log statements have the wrong path in the crate_map #3046

Closed
@brson

Description

@brson

If you write RUST_LOG=::help ./servo you get a list that includes modules from core, std, and servo, but not any of the many other used crates. As a result I can't turn logging on for a lot of stuff. Probably we're hitting some arbitrary limit.

Edit:

When a generic function in crate http_client gets monomorphised when compiling servo, then you have to use RUST_LOG=servo to turn the logs on instead of RUST_LOG=http_client. The problem is this line in trans:

    let modpath = vec::append(                                                                                                                                                
        ~[path_mod(ccx.link_meta.name)],                                                                                                                                      
        vec::filter(bcx.fcx.path, |e|                                                                                                                                         
            alt e { path_mod(_) { true } _ { false } }                                                                                                                        
        ));                                                                                                                                                                   
    let modname = path_str(modpath);  

It prepends the current crate's name to every logging key, so logs for http_client::response_header end up as servo::response_header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions