Skip to content

Give the messages of an options upgrade as R warnings - #23

Merged
boutinb merged 2 commits into
jasp-stats:masterfrom
boutinb:upgradeMsgs
Nov 12, 2026
Merged

boutinb merged 2 commits into
jasp-stats:masterfrom
boutinb:upgradeMsgs

Conversation

@boutinb

@boutinb boutinb commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Problem

Options written for an older version of a module are upgraded by its Upgrades.qml before 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, in status["upgradeMsgs"], but jaspSyntax did not pass that on: from R the messages were only in the log.

Solution

  • loadQmlAndParseOptions() and loadQmlAndParseOptionsStatus() give each message as an R warning: the message itself for the analysis as a whole, <option>: <message> for one about an option.
  • The list of loadQmlAndParseOptionsStatus() has an upgradeMsgs element: 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

  • New test-upgrade-msgs.R with a fixture module upgradeModule that has an Upgrades.qml (two renames, one of a variables list, and a ChangeSetValue with a message): the warnings of both functions, the upgradeMsgs of the status, the warning for an option the form does not know, and no warning for options of the current version.
  • Run against a libSyntaxInterface built from the branch of jasp-desktop#6414: the whole test suite passes, test-wrapper-generation.R included (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 upgradeMsgs in its status.

Not in this PR

  • Loading the Upgrades.qml of jaspTestModule in the bridge logs ReferenceError: qmlUtils is not defined (its line 36): qmlUtils is a context property of the desktop only.

🤖 Generated with Claude Code

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>
@boutinb
boutinb merged commit f5333ef into jasp-stats:master Nov 12, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant