Skip to content

Version 0.4.19 breaks build for target thumbv4t-none-eabi #567

@Anders429

Description

@Anders429

I have a library, mgba_log , which provides a logging implementation for use in Game Boy Advance development, building for the target thumbv4t-none-eabi. Back on version 0.4.18, I was using set_logger() and set_max_level(), which seemed to work fine when compiling for this target. However, with version 0.4.19, the project no longer compiles, with the following error messages:

error[E0425]: cannot find function `set_logger` in crate `log`
   --> /home/runner/work/mgba_log/mgba_log/src/lib.rs:309:10
    |
309 |     log::set_logger(&LOGGER)
    |          ^^^^^^^^^^ not found in `log`

error[E0425]: cannot find function `set_max_level` in crate `log`
    --> /home/runner/work/mgba_log/mgba_log/src/lib.rs:311:24
     |
311  |         .map(|()| log::set_max_level(LevelFilter::Debug))
     |                        ^^^^^^^^^^^^^ help: a function with a similar name exists: `max_level`
     |
    ::: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.19/src/lib.rs:1268:1
     |
1268 | pub fn max_level() -> LevelFilter {
     | --------------------------------- similarly named function `max_level` defined here

You can see these error messages on my CI run, which is what brought my attention to it initially.

Is this an intentional breakage? The documentation for set_logger() mentions a lack of availability for thumbv6 targets, but says nothing about thumbv4 targets. I also checked the changelog and didn't see anything calling this out specifically. Of course, thumbv4t-none-eabi is a tier 3 target, so perhaps it is not guaranteed by this crate anyway (which is totally understandable)?

I assume this is related to the change in #555. For this target, should I just be using the "racy" versions of these functions anyway (meaning it was an error at the non-racy versions worked at all before)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions