Skip to content

fix: import system, cast system, and code quality improvements#1601

Merged
SchoolyB merged 33 commits intomainfrom
dev
May 1, 2026
Merged

fix: import system, cast system, and code quality improvements#1601
SchoolyB merged 33 commits intomainfrom
dev

Conversation

@SchoolyB
Copy link
Copy Markdown
Owner

@SchoolyB SchoolyB commented May 1, 2026

Summary

SchoolyB and others added 30 commits April 30, 2026 14:12
Release binaries were built without -ldflags, so Version and BuildTime
defaulted to "dev" and "unknown". Users who installed via ez install
saw "dev (dev build)" instead of the actual release version.
chore(ci): inject version ldflags in release workflow
Verifies resolve_print_suffix() correctly dispatches println() for
struct functions returning string, float, bool, char, uint, and int.
fix(codegen): remove two unused-variable warnings
…mports (#1596)

- Transitive imports now resolve relative to the importing file's directory
  via new source_dir field on ImportItem, not the entry file's directory
- Directory import module name derivation strips trailing slash to avoid
  empty module names (e.g. "src/engine/" now correctly derives "engine")
- Diamond dependencies (same file via different relative paths) are
  deduplicated using realpath() normalization instead of false E6001 errors
- Self-referential directory imports detected and rejected with E6004
- Added W2013 (duplicate import) and W2014 (redundant sibling import) warnings
Transitive imports now resolve relative to the importing file's
directory, not the entry file. Updated worker.ez to use "../shared.ez".
… file warning (#1596)

- Restructure directory import processing into two passes (parse-all then
  rewrite-all) so sibling files share a combined name mapping
- Null out processed import item paths to prevent re-scan from emitting
  spurious W2013 duplicate warnings
- Add W2015 warning when a direct file import is redundant because the
  file was already pulled in by a directory import
…sitive suppression (#1596)

- Two-pass directory import now generates compound rewrite mappings
  (alias_Name → mod_Name) so sibling qualified types resolve correctly
- Remove uppercase-only guards on type rewriting — types can use any casing
- Suppress W2013 for transitive diamond deps (only warn on direct imports)
- W2015 now tells user which namespace to use instead of redundant import
- Track module names alongside imported file paths for better diagnostics
SchoolyB added 2 commits May 1, 2026 11:21
Stdlib/C imports inside transitively imported files were not being
injected into the main program because the sibling-detection loop
skipped them without clearing the all_sibling flag. Now stdlib and
C imports correctly mark the statement as non-sibling so it gets
injected.
@github-actions github-actions Bot added documentation Improvements or additions to documentation lexer Related to tokenization and lexical analysis parser Related to parsing and AST construction typechecker Related to type checking and validation module-system Related to imports, exports, and module loading stdlib General standard library issues tests Related to unit tests or test infrastructure error-messages Related to improving error messages CI/CD Continuous Integration/Continuous Deployment ezc EZC compiler tool (EZ → C → native binary) labels May 1, 2026
@SchoolyB SchoolyB linked an issue May 1, 2026 that may be closed by this pull request
@SchoolyB SchoolyB merged commit 542ecd0 into main May 1, 2026
@SchoolyB SchoolyB deleted the dev branch May 1, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Continuous Integration/Continuous Deployment documentation Improvements or additions to documentation error-messages Related to improving error messages ezc EZC compiler tool (EZ → C → native binary) lexer Related to tokenization and lexical analysis module-system Related to imports, exports, and module loading parser Related to parsing and AST construction stdlib General standard library issues tests Related to unit tests or test infrastructure typechecker Related to type checking and validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: two unused variable warnings in codegen.c

2 participants