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

Prebuilt provides debug builds #15

Closed
fxha opened this issue Dec 27, 2021 · 8 comments · Fixed by #19
Closed

Prebuilt provides debug builds #15

fxha opened this issue Dec 27, 2021 · 8 comments · Fixed by #19
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@fxha
Copy link

fxha commented Dec 27, 2021

We recently noticed that our build size suddenly increased after updating dependencies. The reasons for this is a 40MB ripgrep application with debug information on Linux (other OSs not tested). I hope you can fix this issue and provide a release version without debug information. Thanks in advance!

$ file vscode-ripgrep/bin/rg
rg: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=153fc3eda21c189844e41173c5c07bd6738fde4c, with debug_info, not stripped

Edit: Target x86_64-unknown-linux-musl

@roblourens
Copy link
Member

Good catch, we are supposed to run strip, but that changed in https://github.com/microsoft/ripgrep-prebuilt/pull/12/files#diff-76d4e149397662fc7816e58b93b9f29d24f27bc395874ca1e090ad6037477ea1R17. cc @deepak1556, I will just remove that condition, I don't think it's needed.

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Dec 28, 2021
@roblourens
Copy link
Member

Oh I see, so there is no strip for musl builds...

@roblourens roblourens reopened this Dec 28, 2021
@roblourens
Copy link
Member

@deepak1556 I can't find any way to strip the musl builds, do you have any idea?

@fxha
Copy link
Author

fxha commented Jan 11, 2022

@roblourens You likely build ripgrep via sources, right? Are there any reasons to build a release version with debug information and strip it before packing? Otherwise you could set debug=0 in Cargo.toml or remove the entry completely.

@roblourens
Copy link
Member

Thanks @fxha I'll try that

@deepak1556
Copy link
Contributor

We build from https://github.com/BurntSushi/ripgrep and the debug info is set in the release profile https://github.com/BurntSushi/ripgrep/blob/0b36942f680bfa9ae88a564f2636aa8286470073/Cargo.toml#L80, I don't think we can override it during build via cargo ?

@fxha
Copy link
Author

fxha commented Jan 12, 2022

Of course you can overwrite repo configs with a cargo profile by creating a file named ~/.cargo/config.toml with following content:

[profile.release]
debug = false

Please see https://doc.rust-lang.org/cargo/reference/profiles.html for more details.

@kkocdko
Copy link

kkocdko commented Nov 10, 2022

@roblourens This problem seems solved, make a new release please? It saved size a lot in vscode package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants