Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

add --shorten-paths #203

Merged
merged 4 commits into from
May 19, 2021
Merged

add --shorten-paths #203

merged 4 commits into from
May 19, 2021

Conversation

japaric
Copy link
Member

@japaric japaric commented May 17, 2021

this flags compresses the paths to crates.io dependencies from full paths to
the format [$cratename-$crateversion]/src/module/file.rs

cc #66


before:

$ cargo rb hello
(..)
stack backtrace:
(..)
   4: main
        at src/bin/hello.rs:6:1
   5: ResetTrampoline
        at /home/japaric/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/cortex-m-rt-0.6.13/src/lib.rs:547:26
   6: Reset
        at /home/japaric/.cargo/registry/src/github.heygears.com-1ecc6299db9ec823/cortex-m-rt-0.6.13/src/lib.rs:550:13

after:

$ cargo rb hello
(..)
stack backtrace:
(..)
   4: main
        at src/bin/hello.rs:6:1
   5: ResetTrampoline
        at [cortex-m-rt-0.6.13]/src/lib.rs:547:26
   6: Reset
        at [cortex-m-rt-0.6.13]/src/lib.rs:550:13

currently only paths in the backtrace are modify (because that was the easiest thing to implement / test)

TODO:

  • also compress paths in defmt logs

japaric added 3 commits May 18, 2021 13:35
this flags compresses the paths to crates.io dependencies from full paths to
the format `[$cratename-$crateversion]/src/module/file.rs`

cc #66
@japaric japaric force-pushed the compress-cratesio-dep-paths branch from 7bd5a8b to 12ea87a Compare May 18, 2021 11:36
@japaric japaric marked this pull request as ready for review May 18, 2021 11:36
bors bot added a commit that referenced this pull request May 18, 2021
206: fix unwinding exceptions that push FPU registers onto the stack r=jonas-schievink a=japaric

the correct value of constant EXC_RETURN_MARKER is 0xFFFF_FFE0 but the value was typo-ed in the
refactor part of PR #163 #203 

226c693#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fcL755

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
@jonas-schievink
Copy link
Contributor

We might want to give this option a shorter name, something like --shorten-paths maybe. This option could then be extended to cover paths to the standard library without having to add another one.

@japaric japaric changed the title add --compress-cratesio-dep-paths add --shorten-paths May 18, 2021
Copy link
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, feel free to r+

@japaric
Copy link
Member Author

japaric commented May 19, 2021

bors r=jonas-schievink

@bors bors bot merged commit 34c8fda into main May 19, 2021
@bors bors bot deleted the compress-cratesio-dep-paths branch May 19, 2021 11:42
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants