Repository navigation
Sync ako/mxcli: check flags undefined return/expression variables and cross-module visibility roles; traceability --junit; OQL on Mendix 9 - #1884
Merged
Conversation
…ithout $R MDL003 exempts the AS clause because the end event returns $R, which holds only while $R has a value where the flow ends. A path off the end with $R never defined is CE0109 on MxBuild (CE0108 when $R is defined only in a branch or loop); a top-level declare is clean. Measured on 11.16.1 over 15 flows, microflow and nanoflow. Guarded by bodyReturns and lastStmtIsReturn. A sweep of every .mdl in the repo (1658 flows, 684 with an AS clause) finds two hits, both correct. docs-site tutorial snippet fixed: it declared an AS variable it never defined. Refs #1258. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v7) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
# Conflicts: # CHANGELOG.md
… defines return $Nope + 1 with $Nope defined nowhere passed check and exec, then failed the build with CE0109. MDL098 joins the $names an expression reads (new exprcheck.VariableReferences) with the names the flow defines (params plus every statement's producers). $currentUser, $currentSession, $latestError, $latestHttpResponse, $latestSoapFault, $currentIndex and $currentObject count as defined everywhere: measured on MxBuild 11.16.1, the first five are accepted in every position, the last two only in their own context (the rule is looser on purpose). A sweep of every .mdl in the repo (1658 flows) finds three hits, all correct. Refs #1258. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
feat(check): MDL097 flags `returns T as $R` when a path ends the flow without `$R`
…e-check # Conflicts: # CHANGELOG.md
feat(check): MDL098 flags an expression that reads a variable nothing defines
…pload-artifact-7 ci: Bump actions/upload-artifact from 4 to 7
…her step Nightly #116 failed in TestRun_RuntimeSessionRunsArmsInTurnAndAlwaysStops: "hot-apply took 72 ms against 108 ms for a one-command step, want the two commands summed". The check compared one sample of a two-command step with one sample of a one-command step, ~30 ms a command, so a stall in the one-command step's single run failed it. The candidate's two hot-apply commands now sleep 300 ms more each (the fake's slowOn takes "a|b" alternatives), and the step must take at least the 600 ms they sum to: a stalled runner can only raise it, while a step that timed one command alone reads ~330. Control: with runStep keeping only the last command's wall time, it fails with "hot-apply took 335 ms". Modelling stalls in the fake (a 30% chance per command of up to 300 ms), the old check failed 3 of 12 runs with the nightly's message, the new one 0 of 12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GeAhBjRBm5vN2ik3ddvVWW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GeAhBjRBm5vN2ik3ddvVWW
Both merged without a CHANGELOG line, which this repo keeps per fix: the replace() function-table fix (#2338) and the declare/set/return type check (#2339). Refs #1258, mendixlabs/mxcli#2308. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
…5joqyu test(bench): check hot-apply's two commands against a floor, not another step
tabPageStoredProps did not list visibleroles, so under mdl 1 check refused Visible: roles (…) on a tab page as 'cannot be stored' (MDL-WIDGET44), and a headerless script was warned it was not written. The builder writes it, describe prints it back and MxBuild 11.16.1 accepts an own-module role on a tab page. Refs #1258, mendixlabs#1460. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
…r module A widget's role-based visibility can only name module roles of its own page, snippet or layout. A role of another module passed check --references and exec, and the build reported CE0149 'reselect roles'. MDL-GRANT04 is MDL-GRANT01's sibling for a widget's roles: it needs no project and runs in the shared pre-flight pass. Measured on MxBuild 11.16.1 over 17 documents (container, dynamic text, layout-grid row, navigation-list item, tab page, snippet, layout, alter page insert): a foreign role is CE0149, an own-module role is clean, and viewing access is irrelevant. Refs #1258, mendixlabs#1460. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
fix(check): Visible: roles on a tab page is stored, so do not refuse it
…ss-module # Conflicts: # CHANGELOG.md
report traceability read the --junit results into its evidence and then reduced each requirement's tests to their names, so the report was identical with and without --junit. Requirements now carry testResults (name and status), and the table shows and marks a failing test. Closes #2340 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
) A 9.x runtime has no preview_execute_oql admin action, and mxcli oql's error sent the user to restart with live-preview flags, which cannot help. When both OQL routes are missing, the runtime's version is read (M2EE about), and below Mendix 10 the error says OQL over the admin API needs 10+ and names the version. 10+ keeps the dev-flags hint. Refs #2341 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
The java-dependencies skill now has a section on a library that registers itself with the JVM: DriverManager does not see a userlib driver (instantiate the driver class), DuckDB refuses a community extension file (install it once, bundle the installed file and its .info, LOAD by name), and only a real build compiles Java. Reported, not measured here. Closes #2314 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…rioritization-24rqgv # Conflicts: # CHANGELOG.md
…24rqgv Batch C: traceability test results, OQL on Mendix 9, Java dependency notes
…ss-module # Conflicts: # CHANGELOG.md
feat(check): MDL-GRANT04 flags `Visible: roles` naming a role of another module
…cli names make diag-coverage reads the diagnostic code IDs from the installed MxBuild's Mendix.Modeler.Texts.dll (plain ASCII PO resources, no monodis needed), compares them with the codes named in the string literals of non-test Go code and in the Starlark lint rules, and ranks the codes mxcli does not name by how many bug-fix records hit them. IDs only: none of Mendix's message text is read out or stored. go/scanner reads the literals, so a code in a comment or a test does not count. covered-as.tsv declares the checks that raise a code without naming it (CE0067 by MDL003, CE0844 by E009). The proposal's hand-quoted '~6%' is replaced by a pointer to the computed figure. Refs #1258. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
A bare Setenv("HOME") leaves the developer's real ~/.mxcli in use on Windows,
where os.UserHomeDir reads USERPROFILE (#1256). TestNoBareHomeSetenv caught it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
feat(scripts): diag-coverage — which of Mendix's check diagnostics mxcli names
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.
Syncs
ako/mxcli:maininto upstream: 11 commits since #1878 —checkcatches more undefined variables and cross-module roles that fail the build, plus report and OQL fixes.check: catch what the build refuses
Each measured on MxBuild 11.16.1 first:
returns T as $Rwhen a path ends the flow without$R. MDL003 exempts the AS clause because the end event returns$R, which only holds while$Rhas a value where the flow ends; a path off the end with$Rnever defined is CE0109 (CE0108 when$Ris defined only in a branch or loop). Checked over 15 flows, microflow and nanoflow; a sweep of every.mdlin the repo (1,658 flows) found two real cases.return $Nope + 1), CE0109 at build.$currentUser,$currentSession,$latestError,$latestHttpResponseand$latestSoapFaultcount as defined everywhere,$currentIndexand$currentObjectin their own context.Visible: roles (…)naming a role of another module. A widget's role visibility can only name module roles of its own page, snippet or layout; another module's role passed check and exec, and the build reported CE0149 ("reselect roles"). Measured over 17 documents.Visible: roles (…)on a tab page is no longer refused undermdl 1(MDL-WIDGET44): the builder writes it, describe prints it back and MxBuild accepts an own-module role there.Reports and OQL
report traceability --junitcarries the test results: it read them and then reduced each requirement's tests to names, so the report was the same with and without--junit. Requirements now carry each test's name and status, and the table marks a failing test. Fixes report traceability: --junit is accepted but changes nothing in the output #1877mxcli oqlon a Mendix 9 runtime says OQL over the admin API needs 10+, naming the version, instead of sending the user to restart with live-preview flags that cannot help. Refs oql: Mendix 9.x runtimes have no preview_execute_oql, so oql cannot read data and the error points at dev flags that cannot help #1879Other
DriverManagerdoesn't see a userlib driver) and DuckDB community extensions.actions/upload-artifact4 → 7 in the nightly workflow (Dependabot)