Skip to content

Commit 6dc7ee2

Browse files
authored
Inference Start (#112)
1 parent fb8a25e commit 6dc7ee2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+21154
-568
lines changed

.github/workflows/reusable-build.yml

Lines changed: 123 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ jobs:
246246

247247
- name: Build Release (Non-Windows)
248248
if: runner.os != 'Windows' && inputs.release-build
249-
run: cargo build-full --release --verbose
249+
run: cargo build --release --verbose
250250

251251
- name: Build Release (Windows MinGW)
252252
if: runner.os == 'Windows' && inputs.release-build
253-
run: cargo build-full --release --verbose --target x86_64-pc-windows-gnu
253+
run: cargo build --release --verbose --target x86_64-pc-windows-gnu
254254

255255
- name: Verify vendored LLVM
256256
run: |
@@ -274,11 +274,11 @@ jobs:
274274

275275
- name: Test Release (Non-Windows)
276276
if: runner.os != 'Windows' && inputs.release-build
277-
run: cargo test-full --verbose
277+
run: cargo test --release --verbose
278278

279279
- name: Test Release (Windows MinGW)
280280
if: runner.os == 'Windows' && inputs.release-build
281-
run: cargo test-full --verbose --target x86_64-pc-windows-gnu
281+
run: cargo test --release --verbose --target x86_64-pc-windows-gnu
282282

283283
- name: Clippy (Non-Windows)
284284
if: runner.os != 'Windows'
@@ -295,53 +295,91 @@ jobs:
295295
run: cargo audit
296296

297297
# Package artifacts (only for release builds)
298-
- name: Prepare Artifact Package (Windows)
299-
if: runner.os == 'Windows' && inputs.package-artifacts
298+
- name: Prepare infc Artifact Package (Windows)
299+
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
300300
run: |
301-
New-Item -ItemType Directory -Force -Path artifact\bin
302-
New-Item -ItemType Directory -Force -Path artifact\lib
303-
Copy-Item target\x86_64-pc-windows-gnu\release\infc.exe artifact\
304-
Copy-Item book\check_deps.ps1 artifact\
305-
Copy-Item external\bin\windows\inf-llc.exe artifact\bin\
306-
Copy-Item external\bin\windows\rust-lld.exe artifact\bin\
307-
308-
- name: Prepare Artifact Package (Linux)
309-
if: runner.os == 'Linux' && inputs.package-artifacts
301+
New-Item -ItemType Directory -Force -Path artifact-infc\bin
302+
Copy-Item target\x86_64-pc-windows-gnu\release\infc.exe artifact-infc\
303+
Copy-Item book\check_deps.ps1 artifact-infc\
304+
Copy-Item external\bin\windows\inf-llc.exe artifact-infc\bin\
305+
Copy-Item external\bin\windows\rust-lld.exe artifact-infc\bin\
306+
Copy-Item external\bin\libLLVM-21.dll artifact-infc\bin\
307+
308+
- name: Prepare infs Artifact Package (Windows)
309+
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
310+
run: |
311+
New-Item -ItemType Directory -Force -Path artifact-infs
312+
Copy-Item target\x86_64-pc-windows-gnu\release\infs.exe artifact-infs\
313+
314+
- name: Prepare infc Artifact Package (Linux)
315+
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
316+
run: |
317+
mkdir -p artifact-infc/bin
318+
mkdir -p artifact-infc/lib
319+
cp target/release/infc artifact-infc/
320+
cp target/release/bin/* artifact-infc/bin/ || true
321+
cp target/release/lib/* artifact-infc/lib/ || true
322+
323+
- name: Prepare infs Artifact Package (Linux)
324+
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
310325
run: |
311-
mkdir -p artifact/bin
312-
mkdir -p artifact/lib
313-
cp target/release/infc artifact/
314-
cp target/release/bin/* artifact/bin/
315-
cp target/release/lib/* artifact/lib/
316-
317-
- name: Package Artifact (Windows)
318-
if: runner.os == 'Windows' && inputs.package-artifacts
326+
mkdir -p artifact-infs
327+
cp target/release/infs artifact-infs/
328+
329+
- name: Package infc Artifact (Windows)
330+
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
331+
run: |
332+
7z a -tzip infc-windows-x64.zip .\artifact-infc\*
333+
$hash = (Get-FileHash infc-windows-x64.zip -Algorithm SHA256).Hash.ToLower()
334+
"$hash infc-windows-x64.zip" | Out-File -Encoding ascii infc-windows-x64.zip.sha256
335+
336+
- name: Package infs Artifact (Windows)
337+
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
319338
run: |
320-
7z a -tzip infc-windows-x64.zip .\artifact\*
321-
certutil -hashfile infc-windows-x64.zip SHA256 > infc-windows-x64.zip.sha256
339+
7z a -tzip infs-windows-x64.zip .\artifact-infs\*
340+
$hash = (Get-FileHash infs-windows-x64.zip -Algorithm SHA256).Hash.ToLower()
341+
"$hash infs-windows-x64.zip" | Out-File -Encoding ascii infs-windows-x64.zip.sha256
322342
323-
- name: Package Artifact (Linux)
324-
if: runner.os == 'Linux' && inputs.package-artifacts
343+
- name: Package infc Artifact (Linux)
344+
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
325345
run: |
326-
tar -czf infc-linux-x64.tar.gz -C artifact .
346+
tar -czf infc-linux-x64.tar.gz -C artifact-infc .
327347
sha256sum infc-linux-x64.tar.gz > infc-linux-x64.tar.gz.sha256
348+
349+
- name: Package infs Artifact (Linux)
350+
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
351+
run: |
352+
tar -czf infs-linux-x64.tar.gz -C artifact-infs .
353+
sha256sum infs-linux-x64.tar.gz > infs-linux-x64.tar.gz.sha256
328354
329-
- name: Prepare Artifact Package (macOS)
330-
if: runner.os == 'macOS' && inputs.package-artifacts
355+
- name: Prepare infc Artifact Package (macOS)
356+
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
331357
run: |
332-
mkdir -p artifact/bin
333-
cp target/release/infc artifact/
334-
cp target/release/bin/* artifact/bin/ || true
358+
mkdir -p artifact-infc/bin
359+
cp target/release/infc artifact-infc/
360+
cp target/release/bin/* artifact-infc/bin/ || true
335361
if [ -d target/release/lib ] && [ "$(ls -A target/release/lib)" ]; then
336-
mkdir -p artifact/lib
337-
cp target/release/lib/* artifact/lib/
362+
mkdir -p artifact-infc/lib
363+
cp target/release/lib/* artifact-infc/lib/
338364
fi
365+
366+
- name: Prepare infs Artifact Package (macOS)
367+
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
368+
run: |
369+
mkdir -p artifact-infs
370+
cp target/release/infs artifact-infs/
339371
340-
- name: Package Artifact (macOS)
341-
if: runner.os == 'macOS' && inputs.package-artifacts
372+
- name: Package infc Artifact (macOS)
373+
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
342374
run: |
343-
tar -czf infc-macos-apple-silicon.tar.gz -C artifact .
375+
tar -czf infc-macos-apple-silicon.tar.gz -C artifact-infc .
344376
shasum -a 256 infc-macos-apple-silicon.tar.gz > infc-macos-apple-silicon.tar.gz.sha256
377+
378+
- name: Package infs Artifact (macOS)
379+
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
380+
run: |
381+
tar -czf infs-macos-apple-silicon.tar.gz -C artifact-infs .
382+
shasum -a 256 infs-macos-apple-silicon.tar.gz > infs-macos-apple-silicon.tar.gz.sha256
345383
346384
- name: Upload to Release (Windows)
347385
if: runner.os == 'Windows' && inputs.upload-to-release
@@ -350,49 +388,86 @@ jobs:
350388
files: |
351389
infc-windows-x64.zip
352390
infc-windows-x64.zip.sha256
353-
391+
infs-windows-x64.zip
392+
infs-windows-x64.zip.sha256
393+
354394
- name: Upload to Release (Linux)
355395
if: runner.os == 'Linux' && inputs.upload-to-release
356396
uses: softprops/action-gh-release@v1
357397
with:
358398
files: |
359399
infc-linux-x64.tar.gz
360400
infc-linux-x64.tar.gz.sha256
361-
401+
infs-linux-x64.tar.gz
402+
infs-linux-x64.tar.gz.sha256
403+
362404
- name: Upload to Release (macOS)
363405
if: runner.os == 'macOS' && inputs.upload-to-release
364406
uses: softprops/action-gh-release@v1
365407
with:
366408
files: |
367409
infc-macos-apple-silicon.tar.gz
368410
infc-macos-apple-silicon.tar.gz.sha256
411+
infs-macos-apple-silicon.tar.gz
412+
infs-macos-apple-silicon.tar.gz.sha256
369413
370-
- name: Upload Workflow Artifact (Windows)
371-
if: runner.os == 'Windows' && inputs.package-artifacts && !inputs.upload-to-release
414+
# Always upload workflow artifacts when packaging - needed for manifest generation
415+
- name: Upload Workflow Artifact infc (Windows)
416+
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
372417
uses: actions/upload-artifact@v4
373418
with:
374419
name: infc-windows-x64
375420
path: |
376421
infc-windows-x64.*
377422
retention-days: 90
378423
compression-level: 0
379-
380-
- name: Upload Workflow Artifact (Linux)
381-
if: runner.os == 'Linux' && inputs.package-artifacts && !inputs.upload-to-release
424+
425+
- name: Upload Workflow Artifact infs (Windows)
426+
if: runner.os == 'Windows' && inputs.package-artifacts && inputs.release-build
427+
uses: actions/upload-artifact@v4
428+
with:
429+
name: infs-windows-x64
430+
path: |
431+
infs-windows-x64.*
432+
retention-days: 90
433+
compression-level: 0
434+
435+
- name: Upload Workflow Artifact infc (Linux)
436+
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
382437
uses: actions/upload-artifact@v4
383438
with:
384439
name: infc-linux-x64
385440
path: |
386441
infc-linux-x64.*
387442
retention-days: 90
388443
compression-level: 0
389-
390-
- name: Upload Workflow Artifact (macOS)
391-
if: runner.os == 'macOS' && inputs.package-artifacts && !inputs.upload-to-release
444+
445+
- name: Upload Workflow Artifact infs (Linux)
446+
if: runner.os == 'Linux' && inputs.package-artifacts && inputs.release-build
447+
uses: actions/upload-artifact@v4
448+
with:
449+
name: infs-linux-x64
450+
path: |
451+
infs-linux-x64.*
452+
retention-days: 90
453+
compression-level: 0
454+
455+
- name: Upload Workflow Artifact infc (macOS)
456+
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
392457
uses: actions/upload-artifact@v4
393458
with:
394459
name: infc-macos-apple-silicon
395460
path: |
396461
infc-macos-apple-silicon.*
397462
retention-days: 90
398463
compression-level: 0
464+
465+
- name: Upload Workflow Artifact infs (macOS)
466+
if: runner.os == 'macOS' && inputs.package-artifacts && inputs.release-build
467+
uses: actions/upload-artifact@v4
468+
with:
469+
name: infs-macos-apple-silicon
470+
path: |
471+
infs-macos-apple-silicon.*
472+
retention-days: 90
473+
compression-level: 0

CHANGELOG.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Testing
11+
12+
- Expand `infs` test coverage from 282 to 429 tests (360 unit + 69 integration) ([#96])
13+
- Add TUI rendering tests using TestBackend for main_view, doctor_view, toolchain_view
14+
- Add integration tests for non-deterministic features (forall, exists, assume, unique, oracle)
15+
- Add tests for error handling, environment variables, and edge cases
16+
- Consolidate test fixtures in `apps/infs/tests/fixtures/`
17+
- Move QA test suite to `apps/infs/docs/qa-test-suite.md` with 9 truly manual tests ([#96])
18+
19+
### infs CLI
20+
21+
- Add automatic PATH configuration on first install ([#96])
22+
- Unix: Modifies shell profile (`~/.bashrc`, `~/.zshrc`, `~/.config/fish/config.fish`)
23+
- Windows: Modifies user PATH in registry (`HKCU\Environment\Path`)
24+
- Users only need to restart their terminal after installation
25+
- Rename environment variable and directory for consistency ([#96])
26+
- `INFS_HOME``INFERENCE_HOME`
27+
- `~/.infs``~/.inference`
28+
- Add `infc` symlink to installed toolchain alongside `inf-llc` and `rust-lld` ([#96])
29+
- Improve `infs install` to auto-set default toolchain when none is configured ([#96])
30+
- When installing an already-installed version without a default toolchain, `infs install` now automatically sets that version as default and updates symlinks
31+
- Provides graceful recovery if default toolchain file was manually removed
32+
- Improve `infs doctor` recommendations for missing default toolchain ([#96])
33+
- When no default is set but toolchains exist, suggests `infs default <version>` instead of `infs install`
34+
- When no toolchains exist, suggests `infs install`
35+
- Fix `infs install` and `infs self update` to fall back to latest pre-release version when no stable versions exist ([#96])
36+
- Previously failed with "No stable version found in manifest" error
37+
- Now uses latest stable version if available, otherwise falls back to latest version regardless of stability
38+
- Fix `infs install` failing with nested archive structure from GitHub releases ([#96])
39+
- GitHub releases wrap tar.gz archives in ZIP files
40+
- Now automatically detects and extracts nested tar.gz after ZIP extraction
41+
- Fix `infs uninstall` leaving broken symlinks when removing non-default toolchains ([#96])
42+
- Previously, `Path::exists()` returned false for broken symlinks, causing them to remain in `~/.inference/bin/`
43+
- Now uses `symlink_metadata().is_ok()` to correctly detect and remove both valid and broken symlinks
44+
- Added `validate_symlinks()` to check for broken symlinks after uninstallation
45+
- Added `repair_symlinks()` to automatically fix broken symlinks by updating them to the default version or removing them
46+
47+
### Build
48+
49+
- Add `infs` binaries to release artifacts for all platforms (Linux x64, Windows x64, macOS ARM64)
50+
- Update release manifest to schema version 2 with separate `infc` and `infs` tool entries
51+
52+
### Project Manifest
53+
54+
- Replace `manifest_version` field with `infc_version` in Inference.toml ([#96])
55+
- `infc_version` is a String (semver format) that records the compiler version used to create the project
56+
- Automatically detected from `infc --version` when running `infs new` or `infs init`
57+
- Falls back to `infs` version if `infc` is not available
58+
- All Inference ecosystem crates share the same version number
59+
1060
### Editor Support
1161

1262
- Add VS Code extension with syntax highlighting for Inference language ([#94])
@@ -112,7 +162,6 @@ Initial tagged release.
112162
- Function definitions with generic type parameters
113163
- Module system with visibility modifiers
114164
- Add `undef` syntax support ([#10])
115-
- Rename `apply` to `verify` ([#10])
116165

117166
### Compiler
118167

@@ -165,3 +214,4 @@ Initial tagged release.
165214
[#69]: https://github.com/Inferara/inference/pull/69
166215
[#86]: https://github.com/Inferara/inference/pull/86
167216
[#94]: https://github.com/Inferara/inference/pull/94
217+
[#96]: https://github.com/Inferara/inference/pull/96

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ serde = { version = "1.0.228", features = ["derive", "rc"] }
6161
leb128 = "0.2.5"
6262
rustc-hash = "2.1.1"
6363
inkwell = { version = "0.8.0", features = ["llvm21-1"] }
64+
65+
[profile.release]
66+
codegen-units = 1 # Better optimization (slower compile)

0 commit comments

Comments
 (0)