-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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(client)!: remove never implemented hot.decline #11036
Conversation
Yeah it's likely a remnant from Snowpack HMR days, but I don't think we should break it. It still has an intent and is future-proof, e.g. if one day Astro decides to use a different framework that implements I think we should document it and type it still, but maybe put a note that it's currently a no-op. |
Agree that we could leave it if there was a good reason for it. But I wonder why Vite doesn't need to implement it. But does it makes sense that Astro is using it? It looks |
I didn't see any clear intent for it.
The last point was probably the intended use, but adding an entry to an API that is just an alias for a well know supported platform feature feels wrong. If another need appear in the feature, I think it's better to discuss it and find a new name in the API for it |
@FredKSchott maybe you could shed some light on why |
Probably not! I was just throwing things at the wall trying to fix some HMR stuff. If it's a noop this can be removed. |
Yea, there's a lot of history here from the early Snowpack and Vite days. You can see the early repo where Evan and I were exploring implementing the same API: https://github.com/FredKSchott/esm-hmr You can see this API spec'd out there: https://github.com/FredKSchott/esm-hmr#decline It's been long enough that I don't remember the history of why this was needed, but I have no need to keep it around at this point if its a no-op. I'm overdue to add a note to that repo README that the idea of a shared "spec" is abandoned, and to redirect people to Vite's HMR docs as the most likely up-to-date docs. |
I still feel like we shouldn't remove it just because we don't implement it though. Webpack also implements
I don't think we should create a new API name when there's prior art. I'm maybe in the outlier here 😬 But I think we should avoid breaking things unless there's a compelling reason besides cleaning things up. |
I think the fact that webpack implements it is a good point in favor of keeping |
For me it should at least be remove from types, because people will read their autocomplete before reading the docs and it can takes sometimes before seeing that it does nothing and go reading the doc |
Removing from the types sounds like a nice middle ground for me too. And also updating the docs regarding it being a no-op and could be implemented in the future, plus directing what to use instead. |
@bluwy @patak-dev Are you ok with this version? |
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.
Looks good to me 👍
Re: #11004