woelper / oculante

A fast and simple image viewer / editor for many operating systems
https://github.com/woelper/oculante
MIT License
790 stars 39 forks source link

No dependencies in Cargo.lock for build with options: --no-default-features notan/shaderc #334

Open yurivict opened 1 month ago

yurivict commented 1 month ago

Describe the bug These items are missing:

                shaderc-0.8.3 \
                shaderc-sys-0.8.3 \
                roxmltree-0.14.1

Desktop (please complete the following information):

Additional context Building in the FreeBSD ports framework.

woelper commented 1 month ago

I don't think I understand this issue, could you elaborate please?

yurivict commented 1 month ago

The project depends on shaderc, but shaderc doesn't appear in Cargo.lock

woelper commented 1 month ago

The project only depends on shaderc if you enable the notan/shaderc feature flag, otherwise it does not. notan/glsl-to-spirv is the default feature as that covers most operating systems, so I think it is expected that Cargo.toml does not contain anything that is related to shaderc.

yurivict commented 1 month ago

Documentation says here that [features] syntax should be used in such case:

[dependencies]
foo = { version = "1.0", optional = true }
bar = { version = "1.0", optional = true }

[features]
fancy-feature = ["foo", "bar"]

This can probably be done with some cargo command, but I don't know cargo enough.

woelper commented 3 weeks ago

Yes, features are currently used for this:

https://github.com/woelper/oculante/blob/57299c42f36dcea36a3d785e77a617882dd8976b/Cargo.toml#L94