fix(new): guard unsupported MxToolset output paths - #865
Open
GG-O-BP wants to merge 1 commit into
Open
Conversation
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.
Closes #825
Summary
--output-dirrecommendationWhy this uses the fallback
I tested the short-path staging approach proposed in the issue before implementing the guard:
update-widgetscheckPathTooLongExceptionwhile exporting widgetsA
substalias also lets the tested operations use a shorter spelling, but that would require wrapping every later MxToolset invocation and make behavior depend on the alias. Staging therefore defers rather than solves the constraint for sufficiently deep projects, matching the fallback condition described in the issue comment.Implementation
mxcli newnow:.mprinMendix.Modeler.Core.dlland measures its longest entry;<app-name>.mprin the calculation when it is longer;The output identity is checked before rollback so a replaced directory is never recursively removed. Windows keeps explicit junction/
substspellings, while Unix resolves an existing symlink prefix to match the path MxToolset observes afterchdir.Verification
Automated checks:
go test ./... -count=1go vet ./cmd/mxcliGOOS=windows GOARCH=amd64 go test -c ./cmd/mxcligit diff --checkFocused tests cover:
.mprNative Windows/MxToolset matrix:
mx create-projectexit 0PathTooLongException, no.mpr, partial files before this fixLongPathsEnabled0 and 1 crossed with processlongPathAwareOFF and ON: all four 260-unit runs exited 1 withPathTooLongExceptionmx.exe; ON used the signed systemdotnet.exemanifest to invoke the samemx.dllLongPathsEnabledwas restored to its original value (0) after the matrixThe host's Application Control blocks unsigned Go test executables, so the full Go suite ran under Rocky Linux/WSL; native Windows behavior was exercised directly with the installed MxToolset, and the package was separately compiled for
windows/amd64.