-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fixed v5.3.0 backward compatibility for macrocalls #7616
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Went ahead and reconciled the tests anyway. |
Thanks @flibbles. The fact that this fix keeps the Relink plugin working seems like it might be an implementation accident. I'm not certain that this fix would necessarily be much help in general because it would appear to only work for code that doesn't check the node type. Any code that is explicitly checking for the type of |
I wouldn't have thought so. If we have a plugin that works exclusively with the parseTreeNode, I'd figure it would see a I'm not sure how it handles because Relink and Uglify don't come at it from the parseTree. They create new methods to attach to each of the wikiparser rules, because working exclusively with the parseTree would lose a lot of important context. Relink, for instance, won't muck up any indentation you had between your widget attributes, but it can only do that if it's dealing with the wikitext, not the parseTree. As v5.3.0 left, Relink definitely couldn't rely only on the parseTree, because macrocall syntax become transclude nodes under the hood, and there's no way to determine that they had been in the Maybe Relink and Uglify are unique from other plugins that way. It works with text, and thus the wikiparsers, while maybe everyone else only looks at the parse tree. Still, does the introduction of two legacy properties really cause parseTree manipulating plugins to break? Genuinely asking. I only know of how Relink and Uglify does it, and I don't know about any other plugins that do text manipulation like they do. |
I mean, if nobody else is having trouble with the fact that macrocalls now turn into transclusions under the hood, then I can fix Relink to cope with both pre and post v5.3.0. And we can overlook backward compatibility in this case. I'd probably just write a method to add the "name" and "params" properties myself if they're not already there. |
I now agree with you that this PR is insufficient, seeing as how I've discovered a few more of my plugins which fail for the exact reasons you described. I will close this. And honestly I'm not sure how to fix this problem. Macrocalls are now transcludes. That's kind of a huge change. As far as I can tell, I'm the only person who's been bothered by the v5.3.0 release. Maybe I can just migrate the last of my plugins. |
Hi @flibbles over on the forums I made a couple of proposals that might improve the situation, and I'd be interested in your views.
|
Okay, after I got done sulking about it, it wasn't too hard to make the new macrocalls backward compatible with the old ones. This makes plugins (or Relink anyway) function without needing to migrate anything for v5.3.0.
The tests are failing. I know. I wanted to make sure this is acceptable before reconciling the tests.