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

chore: add package.cargo-near.debug = true to release profile #195

Closed
wants to merge 1 commit into from

Conversation

dj8yfo
Copy link
Collaborator

@dj8yfo dj8yfo commented Aug 6, 2024

it was noticed that default suggestions to enable backtrace only produce confusion, as backtrace info
without source code is more confusing than helpful:

current (in main) RUST_BACKTRACE=1 cargo near build
backtrace_current_release_build_1
current (in main) RUST_BACKTRACE=full cargo near build
current_full


from this pr RUST_BACKTRACE=1 cargo near build
1_after_change
from this pr RUST_BACKTRACE=full cargo near build
after_full

this beefs up the binary size twice, doing a plain debug = true for release profile results in 250 MB binary

# installed with
# cargo install --locked --path cargo-near
❯ du -sk $(which cargo-near)
28984   /home/jerrick/.cargo/bin/cargo-near
# installed with (`package.cargo-near.debug = true`)
# cargo install --locked --path cargo-near
❯ du -sk $(which cargo-near)
51236   /home/jerrick/.cargo/bin/cargo-near

alternative to this is #196

@dj8yfo dj8yfo marked this pull request as ready for review August 6, 2024 20:48
@dj8yfo
Copy link
Collaborator Author

dj8yfo commented Aug 6, 2024

@race-of-sloths include

@race-of-sloths
Copy link

race-of-sloths commented Aug 6, 2024

@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Are you going to win race-of-sloths this month? If so, you should speed up! Run, Sloth, run!

Shows profile picture for the author of the PR

Current status: stale

This pull request was removed from the race, but you can include it again with @race-of-sloths include command

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

frol pushed a commit that referenced this pull request Aug 6, 2024
alternative to #195 

this pr removes this section for non-debug (dev profile) builds:

![env_section_suggestion](https://github.com/user-attachments/assets/5851a347-ba20-4b6d-a9b7-6fa453853bfc)

it's enabled when binary is installed with `cargo install --locked
--profile dev cargo-near`,
when backtraces have source code info

Co-authored-by: dj8yf0μl <noreply@nowhere.org>
@frol
Copy link
Contributor

frol commented Aug 6, 2024

See #196 (review)

@frol frol closed this Aug 6, 2024
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

Successfully merging this pull request may close these issues.

3 participants