Skip to content

Add version info, setup checks, Makefile options#668

Open
inus wants to merge 1 commit intotoitlang:mainfrom
inus:version_and_setup
Open

Add version info, setup checks, Makefile options#668
inus wants to merge 1 commit intotoitlang:mainfrom
inus:version_and_setup

Conversation

@inus
Copy link
Copy Markdown

@inus inus commented Jan 9, 2026

Add more verbose version information
Change jag setup to check for and avoid re-downloads
Add install, uninstall and sync-cache options to make
Fix 'make test' to skip missing chip firmware

--
E.g.:

build/jag version
Jaguar version:	dev-25f85db
SDK version:	v2.0.0-alpha.189.23+c9669692
Build date:	2026-01-09T05:41:02Z
Build type:	development
build/jag setup -c
=== Jaguar Setup Check ===
Expected Jaguar version: v1.58.0
Expected Toit SDK version: v2.0.0-alpha.189

SDK: OK (v2.0.0-alpha.189 at /Users/inus/.cache/jaguar/sdk)
Assets: OK (v1.58.0 at /Users/inus/.cache/jaguar/assets)
Jaguar metadata file: PRESENT (/Users/inus/.cache/jaguar/sdk/JAGUAR)
Jaguar snapshot: OK (/Users/inus/.cache/jaguar/assets/jaguar.snapshot)
SDK accessibility: OK

Check complete.

Comment thread Makefile
@success_count=0; \
skip_count=0; \
failed=0; \
for chip in esp32 esp32c3 esp32s2 esp32s3; do \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
for chip in esp32 esp32c3 esp32s2 esp32s3; do \
for chip in esp32 esp32c3 esp32c6 esp32s2 esp32s3; do \

Comment thread cmd/jag/commands/setup.go
Comment on lines +20 to +21
// New helper functions

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// New helper functions

Comment thread cmd/jag/commands/setup.go
versionFile := filepath.Join(sdkPath, "SDK_VERSION")
data, err := os.ReadFile(versionFile)
if err != nil {
return false, nil // missing or error → not current
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return false, nil // missing or error not current
return false, nil // Missing or error -> not current.

@floitsch
Copy link
Copy Markdown
Member

Thanks for the PR.
I started reviewing and added a few first comments.

The "problem" is that the PR conflicts with #666 (and maybe #667).
It's also a bit big, because it adds different features in one PR.

Could you split the PR in two (or three):

  1. split the changes to the Makefile. (I already reviewed those, so they should be easy to get in).
  2. rebase your work on top of Give config option for keeping old cache #667. This should simplify things: no need to keep track of which version number is current since each SDK now lives in a directory that has the version number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants