Skip to content

fix(make): leave out modules without generation-target facets and always explain a failed make - #228

Open
sergej-koscejev wants to merge 2 commits into
mainfrom
fix/226-make-not-generated
Open

sergej-koscejev wants to merge 2 commits into
mainfrom
fix/226-make-not-generated

Conversation

@sergej-koscejev

@sergej-koscejev sergej-koscejev commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Fixes #226

Summary

Two causes, both fixed in ProjectMake.runMake, which make module, make project, Code Mode project.make() / makeModules and the build step of mops test all share.

 runMake(models)
   drop models of read-only modules
+  drop models of modules without generation-target facets   # not-generated solutions
+    → one warning per such module
   resources = ModelsToResources(models)
-  if resources is empty → NOTHING_TO_GENERATE
+  sequence = MakeSequence(resources)
+  if sequence has no step → NOTHING_TO_GENERATE              # models that use no language
   run the make
-  FAILED when MPS result fails or an error was reported
+  FAILED when MPS result fails or an error was reported;
+    with no error reported, add one with the reason from the MPS result
  • Not-generated solution fails in TextGen. MPS has no module-level "do not generate" switch, so it generates every generatable model and then looks for an output location in the module's generation-target facets. On MPS 2024.1 and 2025.1 TextGen reports errors when there is none (no output location …, No module facet to specify textgen destination …). Since MPS 2025.3 (MPS-38672) TextGen skips such a model with a warning instead. mops now leaves these models out before the make on every MPS version and reports a warning naming the module, similar to what MPS 2025.3 does. This works for existing projects too; no change to create solution.
  • Empty model: FAILED with no message. MPS's ModulesClusterizer drops a module whose models use no language, so the make sequence has no step. CoreMakeTask then returns FAILURE("not started") without reporting anything. mops now checks the step count and reports nothing to generate.
  • Every FAILED make carries an error. If MPS fails without reporting an error, the response gets make failed without reporting an error: <reason from the MPS result>.

MPS behavior verified in the 2024.1, 2025.1 and 2026.1 sources; written up in the mps-api-research note docs/make-modules-without-output.md (not yet committed there).

Evidence

Issue steps on a copy of _theSimplestLanguage, MPS 2024.1.6:

  • Before:

    $ mops make module repro.sandbox          # empty model
    made 1 module(s): FAILED (0 error(s))      # exit 1, "messages":[]
    

    With a root: FAILED with no output location for repro.sandbox.main@0, No module facet to specify textgen destination ….

    After:

    $ mops make module repro.sandbox
    warning	not generating the models of repro.sandbox: the module has no generation-target facets
    nothing to generate                        # exit 0, also with a ClassConcept root added
    

Tests:

  • MakeSemanticsTest (daemon, through daemon requests as the CLI sends them):
    • not-generated solution with a class root → NOTHING_TO_GENERATE, warning names the module, no source_gen (was FAILED with the TextGen errors)
    • not-generated solution with an empty model → NOTHING_TO_GENERATE
    • java solution with an empty model → NOTHING_TO_GENERATE (was FAILED, no messages)
  • MakeResponseTest (unit): a failed or missing MPS result without an error message gets an error with the reason; at --messages error too.
  • MakeIntegrationTest (CLI): create solution → create model → make module exits 0, prints nothing to generate and the warning.
  • Full daemon test suites pass on 2024.1.6, 2025.1.4, 2026.1.1, prerelease and the pinned 2026.1.2.

Merge Danger

Blast Radius: make output

make project on a project with not-generated solutions now prints one warning per such solution. A module without generation-target facets that someone did expect to generate is now left out with a warning instead of failing.

…ways explain a failed make

Make no longer hands MPS the models of a module without a generation target
facet, such as a solution created with the not-generated preset; --messages info
names the modules it leaves out. A make whose make sequence has no step (its
models use no language) reports nothing to generate. A failed make that MPS
reports no error for gets an error with the reason from the make result.

Fixes #226
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.

make: a not-generated solution is still generated and fails, sometimes with no message

1 participant