Skip to content

chore: add explicit feature for example#524

Merged
h-a-n-a merged 1 commit into
nextfrom
chore/test-features
Aug 11, 2022
Merged

chore: add explicit feature for example#524
h-a-n-a merged 1 commit into
nextfrom
chore/test-features

Conversation

@h-a-n-a

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

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown
Contributor Author

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