-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Doctype shortcut deprecation patch #1374
Conversation
We already discussed that in #1270. It does not help. People who use |
@silvinci Is there a specific reason this can't be merged? It helps us, and it's low risk to keep the functionality. Please see this blog post released on Oct 21st after we upgraded to jade v0.35.0 in the v0.9.4 release of harp. That version of Jade included the |
I did not want to attack you personally. If you feel offended, I am very sorry. If those end-users get a deprecation notice in their console (if they even see it) it's likely they ignore it, as long as everything works how they want it to. By failing and throwing a descriptive error, the users are forced to do the code update. Someday they would be forced anyway, so we can do it now aswell, as we have further breaking changes that require a code update too. Merging this would allow those users to go "I guess I'll do it sometime later... Or never at all". If we thn remove this patch in a later version, we have the same problem we now have. Better do it once and correct. I guess this is what @ForbesLindesay had in mind, when he told me that a deprecation notice is no use to us. |
For your project's misery, I suggest to hold back the Jade update for one release and implement a warning yourself. |
well phrased :P Interesting debate about semver dependency versioning. Personally, I like the latest and greatest, and if a new feature comes out then great (also the bug and security fixes that come with it). I am wondering how you manage them Matej Kramny On Tuesday, 7 January 2014 at 16:01, Jan Buschtöns wrote:
|
In a case like this, where backwards compatibility is so easy to maintain, it is crazy to break compatibility with the vast majority of existing templates. Especially in a language with documentation as shitty as this. From Wikipedia
Also:
Where did you get the "90%" statistic @silvinci? Can you actually point out a 90% rate of ignoring deprecation warnings from data that's been collected? Or even a vast majority? |
It's the decision made by the maintainer. We tried convincing him to deprecate the feature before removing it, but he argued that this is not the only breaking change that would be needed to push jade forwards. So he led them all up in one version so fixing the templates should be easier and a one-time thing. Obviously the 90 % was not meant literally. In the past it often was the case that things broke and people complained, although it was deprecated a long time ago. If you're using jade in a private project (i.e. not an npm module for other users) it shouldn't be a too big deal to update your files. If you have 10+ files containing If you're using jade in a project that is used by others this change does impose a problem. Users who update a meta package wouldn't expect sudden code breakage. Still, fixing the code is easy. I don't want to justify this change as I had minor problems with it aswell, but I want to make it understandable. The commit was pushed and it won't be reverted. What is your exact problem? We can try to work out a convenient fix. |
@silvinci Our platform has couple thousand applications in production with the previously (documented by jade) way of doing things, if we upgrade to The actual merits of this PR have yet to be addressed. So far all we've heard from the jade team is "we decided to change it, deal with it.". I understand things need to break sometimes to move things forward in a positive way but the rationale for not having a deprecation warning for this feature is is basically non-existent "deprecation warnings don't help. people don't pay attention to them" which I demonstrated with facts that prove otherwise in the case when the If a customer gets upset at us for something breaking it helps a lot to have demonstrated that we put forth every effort to warn them of the change. Like I say I think @slang800 sums it up best.
Anyway, at the end of the day, we can stick with With all that said. I'm grateful for this project and the work that is being done to improve jade. Although this is a complaint, please don't be discouraged. I'm overall happy with the work being done here. Cheers. |
I can't merge this PR, as I am no enlisted collaborator for this repository. Even if I was, I probably wouldn't. Not because I decided so, but because @ForbesLindesay did so. He put up these two main reasons:
While I can understand your reasoning very well and partially feel the same. It really is easy to mantain backwards compatibility in this case. However, a decision was made and I don't expect the devs to revert it, although I'd welcome it. I can only encourage you to stick with |
@silvinci, just because @ForbesLindesay said something, it isn't necessarily correct. He is a good programmer, and is often right, but you really gotta think for yourself. One of the main reasons why open source projects like this are so successful is because they benefit from the collective experience of all their contributors. Hundreds of people watching over them and suggesting improvements. Thus, if you blindly follow whoever the maintainer is, you are no longer contributing one of your most valuable assets: your ideas. |
The change is already in npm registry. It doesn't make sense to remove something, then bring it back only to deprecate it. Just put "0.35.x" in your package.yaml file where all your dependencies are and get it over with. |
To add to my last comment; this actually reminds me of a wonderful passage from the Valve Handbook:
|
@slang800 indeed, I'm not always right. Maybe I was wrong in this instance, maybe I wasn't. It is useful to have the collective experiences of the many jade contributors when making development decisions. That is why you will see me making pull requests, rather than commiting to the master branch for almost all changes. If you look back through my pull requests you will see that I typically wait at least 24 hours before merging those pull requests. This is to give other people time to comment/raise objections. If there are objections, I will typically not merge the pull request until after some discussion. If you wanted to argue for gradual deprecation with a warning message, followed by later removal, that was your chance. It is now too late. |
I ask honestly, why do you think it is too late? |
I guess @rlidwka says it:
|
It is never to late to fix a mistake. express --css stylus --jade myapp cd myapp |
This situation reminds me of when the |
@sintaxi I was looking for that issue. Thanks! |
@silvinci np. here is the postmortem from Isaac. The resemblance to this issue is uncanny. https://groups.google.com/forum/?hl=en?hl%3Den#!msg/nodejs/oqlT9ZtUZd0/XicWJx6mC4oJ |
warn/throw/remove is a pretty good policy, don't always follow it myself but I agree with it ;D |
Yeah straight up throwing is a little too much, especially without prior warning. That's one reason I added all those warnings to connect. Looks like we have to release a patch in express pretty much just for this since too many people are complaining. |
/whisper: @jonathanong (except someone would hit "merge", but that would have other consequences) :D |
OK, looks like I should probably have released a version with a warning in. If someone wants to build a version of jade that has warnings, rather than throwing/not working for everything that is deprecated in 1.0.0 then I am prepared to release it as 0.36.0. It isn't too late to do that, but we're not going to have 1.x.y start un-deprecating things. Although this specific change could've been left as backwards compatible, many other breaking changes couldn't have been done in that way. The list of things you'd need to add deprecation warnings for if you want such a version released is as follows:
If it doesn't warn for all of those things, you're not sticking by what you've said should have been done. I don't personally have the time to create such a version right now as it's a large amount of work to write & test, and since all it would lead to is the same complaints because the people who aren't able to cope with locking their version number at 0.35.0 aren't going to manage to lock their version at 0.36.0 either. Since we were pre 1.0.0, the change was made in accordance with Semantic Versioning, going forwards I am going to be doing my very best to continue to stick to Semantic Versioning rules. In accordance with Semantic Versioning, pre 1.0.0 dependencies should be locked to a specific version. |
Additionally, even if I were looking to make this change, the current pull request would not be accepted since it does not add line numbers or file names to the warnings. In this respect, throwing errors is far more helpful. |
|
Changes
This patch does two things:
!!!
doctype shortcut and doctype5
modifierRationale
Given how prevalent the use of
!!!
is, it would be helpful to have a buffer for informing people of this change, and updating applications before being permanently deprecated. Even then, a silent error seems more appropriate than throwing an error to stay consistent with the rest of jades templating behaviour.Please consider accepting this patch and tagging a
v1.0.3
release. It will assist in upgrading to Jade v1 in sintaxi/harp.all tests are passing
thanks,
Brock