Closed frederikrothenberger closed 1 month ago
@itsyaasir: Sorry to bother you again, but I made a mistake in #1397 and this PR fixes it.
@frederikrothenberger
Thank you for your contribution! I noticed that in your changes, the js-sys
dependency is marked as optional This means that the dependency won't be automatically included during the build process unless it is explicitly enabled (by feature IIRC). If you take a look at the github action which is building for wasm32-unknown-unkown
it is failing to find the dep "js-sys" for the now_utc
function. Since we are already compiling it conditionally according to the target, is the optional
required here ?
@itsyaasir: Yes, the optional is required, otherwise you cannot compile to wasm32-unknown-unknwon
without it (breaking compatibility with the ICP platform).
But we should be able to enable it by default (still gated by the target
). Would that be an option?
@itsyaasir: Yes, the optional is required, otherwise you cannot compile to
wasm32-unknown-unknwon
without it (breaking compatibility with the ICP platform).But we should be able to enable it by default (still gated by the
target
). Would that be an option?
That should be fine. We are also using the js-sys dependency for wasm bindings with ts
@itsyaasir: I made it a default feature.
@itsyaasir: I made it a default feature.
Did you forget to push the changes ? I can't see the dependency being a default feature.
You modified this default-features = true
but this only activates the default features of the js-sys
crate as show here
@itsyaasir: Yes, my bad. I got confused about the default switches. Fixed now.
Description of change
In #1397 my intention was to make the
js-sys
dependency mutually exclusive with the featurecustom_time
. As it turns out, it's not that simple and mixing target specific dependencies with feature specific dependencies does not actually work. See here and here.So this removes the broken feature reference in the dependency declaration and instead marks it as
optional
. Also, the featurecustom_time
takes precedence overjs-sys
so these do not actually conflict and one could enable both.Type of change
Add an
x
to the boxes that are relevant to your changes.How the change has been tested
Existing tests
Change checklist
Add an
x
to the boxes that are relevant to your changes.