Skip to content

run --local on Windows ignores --mxbuild-path for mx and the runtime #2049

Backlog

Description

@mkrouwel

mxcli v0.34.0, Mendix 11.12.4

What happens

On Windows, with Studio Pro installed and --mxbuild-path pointing to its mxbuild.exe, mxcli run --local builds with that mxbuild, but uses ~/.mxcli/mxbuild/<version>/ for everything else:

  1. Java dependencies. mx sync-java-dependencies runs ~/.mxcli/mxbuild/11.12.4/modeler/mx. That cache held a Linux CDN download from an older mxcli, so the call fails with executable file not found. The run goes on with a warning, and code that needs those jars fails at runtime.
  2. Runtime. The runtime came from the same cache. It was an incomplete copy (149 bundles against 363 in Studio Pro's runtime), and the start failed with NoClassDefFoundError: org/osgi/service/event/EventHandler.
  3. A renamed cache is still used. After renaming the folder to 11.12.4.linux-cdn, mxcli downloaded a fresh runtime, but still used the renamed folder for mx: Note: no mx for Mendix 11.12.4; using …/mxbuild/11.12.4.linux-cdn/modeler/mx.
  4. Unit tests stay off. With the CDN runtime, the UnitTesting remote API does not start (/unittests/start gives 404). UnitTesting's isLocalDevelopment() looks for a modeler folder next to the runtime's real path (~/.mxcli/runtime/<version>/), and there is none.

Workaround

  • Remove the Linux cache.
  • Make ~/.mxcli/mxbuild/<version>/modeler and ~/.mxcli/runtime/<version>/modeler junctions to Studio Pro's modeler folder.

After that, the dependency sync, the runtime start and the unit tests all work.

Expected

  • On Windows and macOS, when --mxbuild-path (or Studio Pro's bundled mxbuild) is used, take mx from the same folder for sync-java-dependencies, and prefer Studio Pro's runtime.
  • Never use a cached Linux binary on Windows; say so and fall back to Studio Pro.
  • Only use a cache folder whose name is exactly the version.

Related: #1605 (a hint naming an mx that does not exist, on macOS).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions