Skip to content

Conversation

@h-a-n-a
Copy link
Contributor

@h-a-n-a h-a-n-a commented Aug 10, 2022

Summary

Temporarily fix the issue with examples by adding an explicit warning for the user end when trying to invoke an example from command-line

error: target `serve` in package `rspack_node` requires the features: `test`
Consider enabling them by passing, e.g., `--features="test"`

Rust analyzer understands required-features and it will append features to the running command, so basically it is ok for our daily use basis.

For the long-term speaking, it's not a good idea to place configuration in node binding which arouse a mix-up with lib
and cdylib. We will resolve this in the future.

Further reading

rust-lang/cargo#4663
rust-lang/rfcs#2887

@h-a-n-a h-a-n-a requested a review from IWANABETHATGUY August 10, 2022 17:32
@h-a-n-a h-a-n-a merged commit cd3a7e4 into next Aug 11, 2022
@h-a-n-a h-a-n-a deleted the chore/test-features branch August 11, 2022 02:33
@h-a-n-a
Copy link
Contributor Author

h-a-n-a commented Aug 11, 2022

It's not a feature, so I merged this with one approval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants