-
Notifications
You must be signed in to change notification settings - Fork 37
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
Remove diagnostics from default features #379
Conversation
hydroflow/Cargo.toml
Outdated
# Diagnostics feature does not work on wasm32. | ||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] | ||
hydroflow_lang = { path = "../hydroflow_lang", features = ["diagnostics"] } |
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.
Shouldn't this be passed thru hydroflow_macro
?
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.
Arbitrarily chose hydroflow_lang since it was the only one not marked as optional. Can change to hydroflow_macro if you prefer that, I have no opinion.
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.
Hmm yeah, I think we should have the feature in hydroflow_macro
as well and go thru that, only have diagnostics enabled if the macros
feature is enabled
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.
Done, PTAL.
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.
Hmm even when targeting wasm32
in hydroflow we should have diagnostics enabled, right? Because those diagnostics are for the macro which isn't being compiled to wasm32
regardless...
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.
That's what I was thinking, if wasm is only the target we should still be able to have diagnostics
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.
Although, we don't even need these lines because when we build hydroflow_datalog
, we will enable the diagnostic features anyway. So I think I can remove these lines from hydroflow/Cargo.toml entirely.
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.
When we do [the macro parsing] compilation [step] in browser e.g. for the demo, that is when diagnostics dont work
This is just for compiling on your computer with wasm as a target, right? Why don't diagnostics work again? |
Yeah I am slightly confused. I get disabling the default feature so that the core crates compile, but we should leave the feature on when we are depending on them from a proc macro crate because we aren't actually compiling to |
Diagnostics is still enabled for hydroflow and hydroflow_data when building non-wasm32 targets.
@@ -3,6 +3,10 @@ name = "hydroflow_macro" | |||
version = "0.1.0" | |||
edition = "2021" | |||
|
|||
[features] | |||
default = [] | |||
diagnostics = [ "hydroflow_lang/diagnostics" ] |
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.
So because this is a proc macro, diagnostics should just always be on rather than behind a propagated feature.
Closing in favor of #414 |
Diagnostics is still enabled for hydroflow and hydroflow_data when building non-wasm32 targets.
PR for #329.