Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix: dependency-sources reads in place; connector end names are not indexed - #33

Merged
HuiJun merged 2 commits into
developfrom
fix/dependency-sources-review
Dec 1, 2026
Merged

HuiJun merged 2 commits into
developfrom
fix/dependency-sources-review

Conversation

@HuiJun

@HuiJun HuiJun commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the four review findings raised on #32, for a 0.3.1. None of them is in 0.3.0's release machinery.

syspi dependency-sources staged every model in a os.MkdirTemp directory and read it back. It now reads models in place: install.DependencyModels(root) returns []ModelSource{Path, Data} and Archive.TextModels() reads the verified members straight from the ZIP. That one change removes two failures:

  • the WASI build failed before reading the project unless the host preopened a writable temporary directory or set TMPDIR;
  • on a case-insensitive filesystem, two archive members differing only by case (Tools.sysml, tools.sysml) were extracted onto one file, and the export reported the second text for both paths.

The command also binds commonFlags, so -offline and -q are accepted as the README says of every project command (-offline was a usage error). The exported paths (dependency-<n>/<member>) are unchanged. Archive.ExtractTextModels, extractMember and confinedTo had no other caller and are removed.

syspi bundle index: in a .kerml file, an unnamed connector with a named first end was indexed under the end's name:

connector e1 references a to e2 references b;   // indexed "e1"; declares no name
connector c references x from e1 references a to e2 references b;   // "c", as before

The scanner now treats the name as an end's when the separator between the two ends (to, then, =) comes before the token that closes the connector's own declaration (from, first, of), for connector, succession and binding (KerML 8.2.5.5); all no longer replaces the keyword it qualifies. SysML is unaffected: its declaration separators differ and its tests are unchanged.

Testing

  • TestTopLevelNames/kerml_named_connector_ends failed before the fix (e1 indexed five times).
  • TestDependencySourcesReadInPlace runs dependency-sources -offline -q with TMPDIR/TMP/TEMP pointing at a missing directory, over an archive holding Tools.sysml and tools.sysml; the 0.3.0 code fails both the flag and the missing directory.
  • The wasip1 build of the command runs under a WASI host with only the project directory preopened.
  • gofmt, go vet (also GOOS=windows), SYSPI_REQUIRE_VCS=1 go test ./... pass on Linux.

Product Engineer opened this PR for Jason
Implemented in session Publish SysPI CLI to PyPI
Review with Devin · Open in Devin Desktop


devin-ai-integration Bot and others added 2 commits November 30, 2026 22:39
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 30, 2026 22:57

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@HuiJun
HuiJun merged commit 08b861b into develop Dec 1, 2026
11 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