Skip to content

salam check: fail when errors are printed, match what build reports - #2685

Merged
BaseMax merged 6 commits into
mainfrom
fix/salam-check-parity
Nov 4, 2026
Merged

BaseMax merged 6 commits into
mainfrom
fix/salam-check-parity

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 4, 2026

Copy link
Copy Markdown
Member

salam check could print errors and still exit 0, and could report "no errors" on code build rejects.

  • A lex, parse or prune error in an imported package now fails the run. This is in sm.Run, so inspect exits 1 too and other drivers abort instead of continuing.
  • check shares the front end of build (driver_front.salam), so it reads package siblings and reports no entry point, package name claims, E066 in an included package and --target. It also fixes a false E012 on valid multi-file packages.
  • check exits 1 whenever an error was printed.

Old vs new check over 1837 test files: 3 changed. exec/math and exec/console now fail, and build rejects them the same way (they only run under exec). typesense/collections was a false claim from the implicit collections load, fixed here with a test.

Still different from build, documented in GETTING_STARTED: library files with no entry are accepted, and C compiler, codegen and link errors need a build. LLVM and native read only the entry file, so a multi-file entry gets E012 there but builds on C; check follows the backend build would pick. That should get its own fix.

check on the compiler: 21.3 to 22.0s, was 23.1 to 24.0s, at load about 12.

Tested on merged main: check, lint, errors, project, packages 805 passed, native selfhost, MCP protocol test 136 passed. Before the last merge: test_lsp 71 passed and 3 failed, the same 3 as the baseline. MCP, emacs and geany still call inspect, so they get the exit code but not the sibling and entry checks.

load_package threw these results away, so any driver went on after printing
the error. Also count printed errors in the logger and add the package
accessors salam check needs.
Share the per-module step with build_impl, so sibling files of a package entry,
package name clashes and the missing entry error now show up in check. It
follows the backend build would pick and honours --target. Exit 1 whenever an
error was printed.
@BaseMax
BaseMax requested a review from a team as a code owner November 4, 2026 07:08
Copilot AI balanced review requested due to automatic review settings November 4, 2026 07:08
@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

Deployment failed for project salam with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/salamlang?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f4402f6-caac-4589-b2a5-f83a50fe866c
Commits

Reviewing files that changed from the base of the PR and between 8507c82 and 3693401.

Files ignored due to path filters: 24
  • tests/en/check/library_file.out is excluded by !**/*.out
  • tests/en/check/main_lex_error.out is excluded by !**/*.out
  • tests/en/check/no_entry.out is excluded by !**/*.out
  • tests/en/check/package_claim.out is excluded by !**/*.out
  • tests/en/check/pkg_lex_error.out is excluded by !**/*.out
  • tests/en/check/pkg_ownership.out is excluded by !**/*.out
  • tests/en/check/pkg_parse_error.out is excluded by !**/*.out
  • tests/en/check/pkg_with_main.out is excluded by !**/*.out
  • tests/en/check/prelude_name.out is excluded by !**/*.out
  • tests/en/check/sibling_errors.out is excluded by !**/*.out
  • tests/en/check/sibling_ok.out is excluded by !**/*.out
  • tests/en/check/valid.out is excluded by !**/*.out
  • tests/fa/check/library_file.out is excluded by !**/*.out
  • tests/fa/check/main_lex_error.out is excluded by !**/*.out
  • tests/fa/check/no_entry.out is excluded by !**/*.out
  • tests/fa/check/package_claim.out is excluded by !**/*.out
  • tests/fa/check/pkg_lex_error.out is excluded by !**/*.out
  • tests/fa/check/pkg_ownership.out is excluded by !**/*.out
  • tests/fa/check/pkg_parse_error.out is excluded by !**/*.out
  • tests/fa/check/pkg_with_main.out is excluded by !**/*.out
  • tests/fa/check/prelude_name.out is excluded by !**/*.out
  • tests/fa/check/sibling_errors.out is excluded by !**/*.out
  • tests/fa/check/sibling_ok.out is excluded by !**/*.out
  • tests/fa/check/valid.out is excluded by !**/*.out
Files selected for processing: 66
  • SKILL.md
  • compiler/cli/cli_api.salam
  • compiler/driver/driver_api.salam
  • compiler/driver/driver_build.salam
  • compiler/driver/driver_front.salam
  • compiler/logger.salam
  • compiler/semantic/sema_api.salam
  • compiler/semantic/sema_packages.salam
  • compiler/semantic/semantic.salam
  • docs/GETTING_STARTED.md
  • docs/ai/AGENTS.md
  • tests/en/check/library_file/CHECK_ONLY
  • tests/en/check/library_file/ENTRY
  • tests/en/check/library_file/mylib.salam
  • tests/en/check/main_lex_error/main.salam
  • tests/en/check/no_entry/main.salam
  • tests/en/check/package_claim/a.salam
  • tests/en/check/package_claim/b.salam
  • tests/en/check/package_claim/main.salam
  • tests/en/check/pkg_lex_error/badlex.salam
  • tests/en/check/pkg_lex_error/main.salam
  • tests/en/check/pkg_ownership/liba.salam
  • tests/en/check/pkg_ownership/main.salam
  • tests/en/check/pkg_parse_error/badparse.salam
  • tests/en/check/pkg_parse_error/main.salam
  • tests/en/check/pkg_with_main/libm.salam
  • tests/en/check/pkg_with_main/main.salam
  • tests/en/check/prelude_name/ENTRY
  • tests/en/check/prelude_name/collections.salam
  • tests/en/check/sibling_errors/ENTRY
  • tests/en/check/sibling_errors/demo/demo.salam
  • tests/en/check/sibling_errors/demo/helpers.salam
  • tests/en/check/sibling_ok/ENTRY
  • tests/en/check/sibling_ok/multi/multi.salam
  • tests/en/check/sibling_ok/multi/other.salam
  • tests/en/check/valid/good.salam
  • tests/en/check/valid/main.salam
  • tests/fa/check/library_file/CHECK_ONLY
  • tests/fa/check/library_file/ENTRY
  • tests/fa/check/library_file/mylib.salam
  • tests/fa/check/main_lex_error/main.salam
  • tests/fa/check/no_entry/main.salam
  • tests/fa/check/package_claim/a.salam
  • tests/fa/check/package_claim/b.salam
  • tests/fa/check/package_claim/main.salam
  • tests/fa/check/pkg_lex_error/badlex.salam
  • tests/fa/check/pkg_lex_error/main.salam
  • tests/fa/check/pkg_ownership/liba.salam
  • tests/fa/check/pkg_ownership/main.salam
  • tests/fa/check/pkg_parse_error/badparse.salam
  • tests/fa/check/pkg_parse_error/main.salam
  • tests/fa/check/pkg_with_main/libm.salam
  • tests/fa/check/pkg_with_main/main.salam
  • tests/fa/check/prelude_name/ENTRY
  • tests/fa/check/prelude_name/collections.salam
  • tests/fa/check/sibling_errors/ENTRY
  • tests/fa/check/sibling_errors/demo/demo.salam
  • tests/fa/check/sibling_errors/demo/helpers.salam
  • tests/fa/check/sibling_ok/ENTRY
  • tests/fa/check/sibling_ok/multi/multi.salam
  • tests/fa/check/sibling_ok/multi/other.salam
  • tests/fa/check/valid/good.salam
  • tests/fa/check/valid/main.salam
  • tools/bash/run-tests.sh
  • website/content/en/tools.txt
  • website/content/fa/tools.txt
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@BaseMax
BaseMax merged commit 0bb96a5 into main Nov 4, 2026
9 of 11 checks passed
@BaseMax
BaseMax deleted the fix/salam-check-parity branch November 4, 2026 07:08
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.

2 participants