Repository navigation
Give the messages of an options upgrade as R warnings - #23
Merged
Merged
Conversation
Options written for an older version of a module are upgraded by its Upgrades.qml before the form parses them (jasp-desktop#6414). The bridge reports what that upgrade had to say, and which options the form does not know, in status["upgradeMsgs"], but nothing passed it on to R. loadQmlAndParseOptions and loadQmlAndParseOptionsStatus now give these messages as warnings, and the status has them as `upgradeMsgs`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Description.qml parser requires an icons directory. The .gitkeep that kept minimalModule's one in git was in .Rbuildignore, so R CMD build dropped the then-empty directory and 13 tests failed in R CMD check. The .gitkeep of upgradeModule was not ignored and gave a hidden-file NOTE instead. Use a non-hidden placeholder icon in both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Options written for an older version of a module are upgraded by its
Upgrades.qmlbefore the form parses them (jasp-stats/jasp-desktop#6414). The bridge reports what the upgrade had to say, and which options the form does not know, instatus["upgradeMsgs"], but jaspSyntax did not pass that on: from R the messages were only in the log.Solution
loadQmlAndParseOptions()andloadQmlAndParseOptionsStatus()give each message as an R warning: the message itself for the analysis as a whole,<option>: <message>for one about an option.loadQmlAndParseOptionsStatus()has anupgradeMsgselement: the json{ <option name, "" for the analysis>: [messages] },""when there are none.Both are used by
jaspBase::runWrappedAnalysis, so the warnings of a wrapper call show up without a change in jaspBase.Testing
test-upgrade-msgs.Rwith a fixture moduleupgradeModulethat has anUpgrades.qml(two renames, one of a variables list, and aChangeSetValuewith a message): the warnings of both functions, theupgradeMsgsof the status, the warning for an option the form does not know, and no warning for options of the current version.libSyntaxInterfacebuilt from the branch of jasp-desktop#6414: the whole test suite passes,test-wrapper-generation.Rincluded (with a jaspTestModule checkout next to it).Depends on
The tests skip themselves with a SyntaxInterface that does not upgrade options, which is every released one up to v1.0.beta.8: they only run on CI once jasp-desktop#6414 is merged and a new SyntaxInterface release is tagged here. With such an older binary nothing changes: there is no
upgradeMsgsin its status.Not in this PR
Upgrades.qmlof jaspTestModule in the bridge logsReferenceError: qmlUtils is not defined(its line 36):qmlUtilsis a context property of the desktop only.🤖 Generated with Claude Code