-
Notifications
You must be signed in to change notification settings - Fork 469
Deprecate bs-dependencies
and bs-dev-dependencies
#7658
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
base: master
Are you sure you want to change the base?
Conversation
35d577b
to
b4fdc3a
Compare
use initialization logic instead of serde
d55428c
to
1bd6371
Compare
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
This is great! Thanks a lot for your work! Could you maybe also include the |
Reminder that this needs to be updated in other tools that use the config file as well. Editor tooling is one, maybe the only one. Maybe we could have a look at having rewatch supply the needed build state from these things to whoever needs them, like the editor tooling. |
rewatch/src/build/packages.rs
Outdated
jsx: None, | ||
gentype_config: None, | ||
namespace_entry: None, | ||
config: super::config::tests::create_config( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I love this, going from a named struct to positional args. The struct creation is a bit verbose, but I don't mind it too much since it's explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a test method tho. And it does not work otherwise because I introduced private fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could pass a wrapper struct around the arguments.
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
pub mod tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this need to be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comment above
DEPRECATION_REGISTRY.get_or_init(|| Mutex::new(AHashSet::new())) | ||
} | ||
|
||
pub fn log_deprecated_field(field_name: &str, replacement_field_name: &str, file_path: &PathBuf) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need global state for this since it's already in the config struct. We can just log them out when we log all warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are warnings only logged once? I needed a mechanism to only log once per config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And can you please show me where we log all warnings?
@@ -1,4 +1,10 @@ | |||
Cleaned 0/15 | |||
WARN: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't prepend this with WARN:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from the macro. Is there another logging mechanism?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can remove the deprecation_registry and just log after scanning the packages this looks good!
Fixes a part of #7455
bs-dependencies
andbs-dev-dependencies