Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add explicit feature for example #524

Merged
merged 1 commit into from
Aug 11, 2022
Merged

Conversation

h-a-n-a
Copy link
Collaborator

@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
Collaborator 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.

2 participants