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
JSONata falls back to compatibility mode when there’s a string with ’ msg ’ in it #4532
Comments
I see two options: DeprecationMark it deprecated in the next major release (4.0) and remove it in 5.0. Immediate removalRemove it in 4.0 directly and add a section with breaking changes in the release notes. Breaking changes are unavoidable as software evolves. So this is something that has to be clarified and documented in general, so users know what to expect. |
I feel it's quite risky to remove compatibility mode. You only see this deprecation warning when opening a JSONata editor. The current one is quite subtle, I wouldn't be surprised if lots of people use compatibility mode without thinking about it. When I raised the issue I was thinking more about tightening the regexp :) |
Well, it's risky, I agree. But you can't keep certain features in a software forever. There has to be a well-documented plan on how to phase something out. The next best thing is a major release, where breaking changes can occur and should be documented, of course. |
Could you we create a flow to run on the flow.json file in the next major upgrade. Replace any reference to So if some one upgrade and had issues they could just run the replace |
The "possible some other conditions" is doing a lot of work in that sentence. One of the reasons the regex check for Creating a script that would safely migrate an existing flow is likely a hard task than trying to improve the regex that detects it in the first place. |
I was thinking if the
Take the above anything that is between quotes(which in flow.json would have \ to) can be ignored, then any other val having Just a thought, if you were to remove compatibility mode making it easy for a good portion of people to convert with out going through the flow.json manually. |
If we were to remove legacy mode in v4 I'd likely advocate keeping the regex to inform (status message or node.warn/node.error) the user of possible differences. I agree software needs to evolve and legacy processing should be dropped at some point but perhaps the safer option is to keep legacy processing and add a more clear more prominent node.status/node.warn in v4 that spells out the removal in v5 is the better option all things considered? |
If I recall correctly, there was a code change early on to expose the It has been years now, and I'm fine with dropping that support -- but perhaps there is another option, where references to |
Current Behavior
See https://discourse.nodered.org/t/jsonata-falls-back-to-compatibility-mode-when-theres-a-string-msg-in-it/84692
Expected Behavior
Should not fallback when it encounters
msg
in a stringThe bigger question for me is, is it time to drop the legacy mode?
Steps To Reproduce
See https://discourse.nodered.org/t/jsonata-falls-back-to-compatibility-mode-when-theres-a-string-msg-in-it/84692
Example flow
Environment
The text was updated successfully, but these errors were encountered: