Closed Bug 1338282 Opened 7 years ago Closed 7 years ago

rust-url-capi specifies peculiar [profile.dev] options in its Cargo.toml

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: froydnj, Unassigned)

References

Details

(Whiteboard: [necko-would-take])

Attachments

(1 file)

Looking at http://dxr.mozilla.org/mozilla-central/source/netwerk/base/rust-url-capi/Cargo.toml#7, we have:

[profile.dev]
opt-level = 3
debug = true
rpath = true
lto = true

which is...a little aggressive for debugging.  It also causes conflicts with Cargo workspaces, as Cargo expects profile.* to only be specified at the root, and complains if non-root packages specify profile information:

warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /home/froydnj/src/gecko-dev.git/netwerk/base/rust-url-capi/Cargo.toml
workspace: /home/froydnj/src/gecko-dev.git/Cargo.toml

Valentin, is netwerk/base/rust-url-capi/ a straight import of an upstream package, or is it something local to the Mozilla tree?  In either case, is it possibly to strip out those profile settings?  They only make sense when compiling rust-url-capi as a standalone thing, and don't really apply to either the way we currently include rust-url-capi in our build, or with a future Cargo workspaces setup.
Flags: needinfo?(valentin.gosu)
We can definitely strip them out. They are left from the first time I implemented this, and was testing library size and optimizations. Let me know if you want me to write the patch or review it. Thanks!
Flags: needinfo?(valentin.gosu)
Whiteboard: [necko-would-take]
The options were a little aggressive for debugging and weren't really
applicable when integrating rust-url-capi into a larger project.
Attachment #8837635 - Flags: review?(valentin.gosu)
Comment on attachment 8837635 [details] [diff] [review]
remove profile.dev options from rust-url-capi's Cargo.toml

Review of attachment 8837635 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/base/rust-url-capi/Cargo.toml
@@ -17,3 @@
>  [dependencies]
>  libc = "0.2.0"
>  url = "1.2.1"

This will conflict with bug 1339809 where it's updated to 1.4.0
Attachment #8837635 - Flags: review?(valentin.gosu) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b605cdbab6fc
remove profile.dev options from rust-url-capi's Cargo.toml; r=valentin
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0c827c71695
remove profile.dev options from rust-url-capi's Cargo.toml; r=valentin
https://hg.mozilla.org/mozilla-central/rev/b605cdbab6fc
https://hg.mozilla.org/mozilla-central/rev/f0c827c71695
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.