Skip to content

refactor(syntax): move the foundation and syntax packages into internal/syntax - #440

Merged
HuiJun merged 2 commits into
developfrom
refactor/layer-syntax
Sep 19, 2026
Merged

HuiJun merged 2 commits into
developfrom
refactor/layer-syntax

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

What and why

First step of moving every package under internal/ into layer directories, one directory per pull request, bottom-up. This one moves the foundation and syntax packages into internal/syntax/:

internal/core/{source,ast,ast/astcodec,pack,diag,lexer,parser,format}
  → internal/syntax/{source,ast,ast/astcodec,pack,diag,lexer,parser,format}

A mechanical relocation: git mv, import-path rewrite across the root module and tools/, and the path strings that follow (Makefile/CI/scripts, sonar-project.properties, packaging/msys2/PKGBUILD, test path strings, the self-model's goPackage references, the file citations in docs/project/validation-constraints.md). No identifier renames, no behaviour change.

tests/hygiene/layering_test.go now names layers by directory (syntax, semantic, ir, check, exec, translate, doc, workspace, frontend, tooling); the former foundation row folds into syntax. Every existing tolerated and removed edge is kept. tests/hygiene/protoconv_test.go accepts imports from any layer directory below frontend.

The examples digest in docs/project/pilot-differential-baseline.json is re-recorded because the self-model's goPackage strings changed; no other figure in the baseline moved.

docs/internals/architecture.md and the roadmap are updated in a docs pull request once the whole stack has landed.

How it was verified

go build ./..., go vet ./..., gofmt -l . (empty), make lint, make docs-check, the full suite with OPENSYSML_REQUIRE_TRAINING_CORPUS=1 OPENSYSML_REQUIRE_PILOT_CORPORA=1 OPENSYSML_REQUIRE_PILOT_LIBRARY_XMI=1 go test -count=1 ./..., the tools/ module (build, vet, test, doc-counts -check), python3 scripts/changelog.py check. go list ./internal/... | wc -l and the func Test count are unchanged from develop.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

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 September 19, 2026 09:04

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔍 Devin Review: 2 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

devin-ai-integration Bot and others added 2 commits September 19, 2026 14:37
…al/syntax

Moves source, ast (with astcodec), pack, diag, lexer, parser and format
from internal/core to internal/syntax and rewrites their imports; the
hygiene layer test now names the layer directories.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…tial baseline

The self-model's Go package references moved to internal/syntax.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@HuiJun
HuiJun merged commit 7141386 into develop Sep 19, 2026
12 checks passed
@HuiJun
HuiJun deleted the refactor/layer-syntax branch September 19, 2026 17:57
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