-
Notifications
You must be signed in to change notification settings - Fork 5.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
Flags like --unstable Should Not Apply To Every Library #7947
Comments
You don't need to undo it - all code that worked with the
Yes it should. Permissions? All modules.
That is the point of |
Code was made in my opinion to be much uglier so yes I will undo it. Maybe not as much as a rush as before, but for sure that ugly code should be cleaned up.
When Deno is telling my libs users that my lib is having errors and their projects can't run until my lib is fixed yes it is forcing. This isn't an option. Deno should not be applying --unstable to stable libraries.
There is already a full discussion about this and even Ry has stated he is very interested in doing this where Permissions can be separated but he doesn't know it is possible. Someone needs to do the research first. But it is something he would want to do. #171
Yes i think this should also not apply to all code. If 1 library is having an issue preventing ur project from running you could no-check that library, not all your code and every other deps code as well that works perfectly without no-check.
I'm not sure about this but i think this would merit running on all code.
This is 100% something that should not run in each library. I opened an issue about this separately which sparked the proposal of removing the entire --config flag from Deno. #7701 #7732
This is something that still doesn't work properly (if i am not mistaken), as you can't include this in libraries only end user code. So not really sure how this matters if this flag effects libs.
The fact is that this flag is causing Deno to cause problems in I can't exactly say hey you need MongoDB in your project sorry I won't allow you to use my lib because Deno told me not to allow you to use my lib if you want MongoDB.
|
I believe the impact you're experiencing is because when you use |
Regardless of your experience, this is impossible. The
Your library does use |
@andreespirela Correct.
@nayeemrmn Then perhaps this entire concept needs to be rethought of using the
@nayeemrmn Incorrect. My library has no dependencies on anything using unstable. The user who uses my library added a dependency, in this case, MongoDB for their project which has 0 effects on my lib but MongoDB requires unstable so now every lib is effected. In essence, Deno is causing problems in Also of note is that the TLDR: The problem isn't 1 flag in general but the concept that a flag is enforced on every library. |
@Skillz4Killz I understand the concern, I myself had to refactor a lot of code for one of my packages to work the same way I did when 1.2 came out which broke many packages. But I have to say, I don't think this is a Deno issue, there are several things to address:
(While @kitsonk referred to TS configuration, afaik the same logic applies here, it is something handled by and to the runtime API, not something of "module individualism") The complexity of it can even make it an impossible feature to have, flags such as
If a code is well maintained, That's my take on it. It is hard for me to say all that because I am an stubborn person when it comes to breaking changes, but I'm not really sure if there's a point to be made about the |
@andreespirela How do you explain every library breaking that doesn't use --unstable? My library broke and it caused me to have to fix hundreds of files. The fact that another library can cause my library to be unusable is crazy. It is properly maintained and I try to keep it updated to TS changes all the time. In fact, I am even trying to be ahead of the curve and fixing for things in 4.1 which is what sparked #7701 Note: I am not blaming Deno for the whole export-import type stuff. My concern is with the fact that another library can break my library. If a user adds a dependency that requires them to have --unstable, suddenly every library in existence is treated as unstable even though they are perfectly stable and do not expect to be broken. As a lib maintainer, it is an absolute nightmare to have to always keep libs up to date with unstable. Users that add the --unstable flag aren't being told that the problem lies in the unstable dependency they are being told the problem is from my library(which is stable). How is every library maintainer expected to keep up to date with unstable changes? I can't just simply tell the entire community, "If you want to use Deno, don't use MongoDB as almost every Deno library will break once you add MongoDB since it uses --unstable." Or maybe "Stop using TypeScript as Deno doesn't play well with TS compiler/configs causing unstable libraries to break other stable libraries." These are not valid at all. TS is amazing and so is MongoDB. My library should not break because a user decided to use TS and MongoDB. I don't know how complex it is to achieve this, I really don't. But what I do know is how problematic it is to maintain a library in Deno because of this and I would argue it is much more harmful for the long term survival of Deno community if the libraries are impossible to maintain as they require always needing to be up to date with unstable flag. Deno unstable flag should never break production ready stable libraries or at the least it needs to clarify very well that errors are happening BECAUSE of the unstable flag and the developer should remove the |
Woah. This is a lot of words... First we have a point in time problem. We allowed a lot of TypeScript in Deno that causes problems with I think given the maturity of Deno, everyone should expect that we might break things and people will have to update their code. We will try to be mindful, but dragging around lots of legacy code is something that doesn't benefit anyone. Having 20 different versions of runtime environments with 20 different config options and a complex configuration for the end user to say "this module runs like this and this module runs like that" is also not a good thing. That means sometimes we will break things though. Part of the reason why we put these things behind I am hoping with 1.5 we settle down the fundamentals of what "flavour" of TypeScript we run in Deno along with a good set of documentation of why things are the way they are. This will though break some code, but having a fixed position that people can reliably develop for and have confidence that their end users can use in Deno reliably. We could have tried to make these changes with another flag, but no one would have used it and less code would have been updated. Dammed if we do damned if we don't. |
I did use it only for all that time I spent updating my lib for it to have been wasted and I have to, unfortunately, undo it all because it's been undone. Perhaps this should have been for 2.0 which would have prevented me from doing this unnecessarily. @kitsonk I agree wholeheartedly with you about almost everything you said. The one thing I slightly disagree with is that 1.5 will solve this issue. The problem isn't TS itself but the fact that Important Points:
I see three potential solutions which I have stated above:
As an aside, I also disagree with Users are opting to use "unstable" libs knowing they are unstable because there are not any stable alternatives. I can't stop them from using unstable libs. I can't stop them from using unstable std features. I can't stop them from using unstable libs because they need MongoDB. Only thing we can do is handle |
#7800 I just saw this now from a PR removing this in vscode plugin and am speechless. The amount of time I wasted editing hundreds of files on 5 different projects because this option was enforced because one of the deps that my modules user needed had unstable that had nothing to do with my modules at all 😭 Really disheartening to see all that wasted time and now needing to undo it all.
Applying a single flag should never affect every library. Just because the user of my lib has
--unstable
for another library, Deno marks all libs as using --unstable and causing users to see my lib as unstable/broken and preventing them from running their project. I don't believe this is a good solution to apply the flag to everything. Even though my lib is not unstable, my lib is now the reason they can not run their project, so it's not an option but forcing me to update all my code and then in under a month later "Whoops, we don't need this anymore."The text was updated successfully, but these errors were encountered: