-
-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
Some projects use different casing, naming or omits whatever is considered the default. To account for this, the interpolated libc can be customized using [install.libc] similarly to [install.arch].
src/schema.rs
Outdated
@@ -18,10 +18,24 @@ pub struct DetectSchema { | |||
pub version_files: Option<Vec<String>>, | |||
} | |||
|
|||
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq)] | |||
#[serde(rename_all = "lowercase")] | |||
pub enum HostLibc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me pull this over into the system_env
crate, as it'll be useful there also.
@Phault Landed and published the crates for this moonrepo/proto#426 If you want to update the deps and use that, this should be good to go. |
Great, I've updated it to use that now. 👍 |
@@ -180,13 +180,15 @@ fn interpolate_tokens( | |||
|
|||
// Avoid detecting musl unless requested | |||
if value.contains("{libc}") { | |||
let libc = HostLibc::detect(env.os); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a new env.libc
you can use here, since detect won't work in wasm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, didn't realize the implementation of is_musl was different. Glad you caught it.
I'll land this and make the change so I can get it in the next release. Thanks! |
Some projects use different casing, naming or omits whatever is considered the default. To account for this, the interpolated libc can be customized using [install.libc] similarly to [install.arch].
Ran into this while creating a Biome plugin, as it omits the libc part if gnu is used.