Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
918beb2
Add list-registry-test.
floitsch May 30, 2025
03bc065
Fix.
floitsch May 30, 2025
e25a496
Sort packages.
floitsch May 30, 2025
0632231
Merge branch 'master' into floitsch/pkg.20
floitsch Jun 2, 2025
b8c9674
Merge branch 'master' into floitsch/pkg.20
floitsch Jun 14, 2025
0118aa0
merge master.
floitsch Jun 14, 2025
5d55fa1
A few more renames from toit.pkg to 'toit pkg'.
floitsch Jun 14, 2025
8355910
Merge branch 'floitsch/pkg.10-merge_toit.go-pkg' into floitsch/pkg.20
floitsch Jun 14, 2025
7ba8a79
Add another pkg test.
floitsch Jun 14, 2025
512c993
Add search test.
floitsch Jun 15, 2025
e8cbe47
Replace '\' by '/' in normalized gold output.
floitsch Jun 15, 2025
d4e739d
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 15, 2025
2d7c67c
WIP.
floitsch Jun 15, 2025
bb9fa73
WIP.
floitsch Jun 15, 2025
6498f58
Update gold.
floitsch Jun 15, 2025
1d8cdc4
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 15, 2025
fbc998a
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jun 15, 2025
2111f80
Merge branch 'master' into floitsch/pkg.10-merge_toit.go-pkg
floitsch Jun 17, 2025
54c05af
Merge branch 'floitsch/pkg.10-merge_toit.go-pkg' into floitsch/pkg.20
floitsch Jun 17, 2025
b213811
Merge branch 'floitsch/pkg.20' into floitsch/pkg.30
floitsch Jun 17, 2025
519a024
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 17, 2025
1ebcc39
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jun 17, 2025
71d46a3
Update gold.
floitsch Jun 18, 2025
4d73d33
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 18, 2025
3e92c4d
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jun 18, 2025
79b185e
Update gold.
floitsch Jun 18, 2025
af8a9a2
Better normalization.
floitsch Jun 18, 2025
de5d5b7
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 18, 2025
1a93e79
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jun 18, 2025
cb6bc2b
Better normalize.
floitsch Jun 21, 2025
93a458e
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 21, 2025
5ee9e9b
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jun 21, 2025
08dbdbb
Make more robust.
floitsch Jun 21, 2025
0ded73c
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 21, 2025
bd51e9a
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jun 21, 2025
2aac1ed
Fix search, so it includes name.
floitsch Jun 21, 2025
85de177
More normalization.
floitsch Jun 22, 2025
f02f673
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jun 22, 2025
3ca975e
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jun 22, 2025
8133bd5
Update test.
floitsch Jun 22, 2025
d276040
Escape package paths.
floitsch Jun 28, 2025
da6facc
Add info output when installing a package.
floitsch Jun 28, 2025
fe88663
Port another test.
floitsch Jun 28, 2025
440a445
Test is passing now.
floitsch Jun 28, 2025
f8e3da0
Merge branch 'floitsch/pkg.50' into floitsch/pkg.60
floitsch Jun 28, 2025
ecb2edb
Merge branch 'floitsch/pkg.60' into floitsch/pkg.70
floitsch Jun 28, 2025
40fc324
Remove go code.
floitsch Jul 22, 2025
b8b8704
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jul 22, 2025
264da78
Merge branch 'floitsch/pkg.50' into floitsch/pkg.60
floitsch Jul 22, 2025
d13c30c
Merge branch 'floitsch/pkg.60' into floitsch/pkg.70
floitsch Jul 22, 2025
234a6de
Write README.md
floitsch Jul 22, 2025
ccbd12f
Merge branch 'floitsch/pkg.50' into floitsch/pkg.60
floitsch Jul 22, 2025
70531b4
Merge branch 'floitsch/pkg.60' into floitsch/pkg.70
floitsch Jul 22, 2025
63543de
fix.
floitsch Jul 22, 2025
102dc9b
Merge branch 'floitsch/pkg.50' into floitsch/pkg.60
floitsch Jul 22, 2025
67e4492
Merge branch 'floitsch/pkg.60' into floitsch/pkg.70
floitsch Jul 22, 2025
0e39d6d
Make downloaded packages read-only.
floitsch Jul 22, 2025
1b80547
Remove Go code, and force deletion.
floitsch Jul 22, 2025
c77d7cd
Merge branch 'floitsch/pkg.70' into floitsch/pkg.80
floitsch Jul 22, 2025
bae5bd1
Use in other file.
floitsch Jul 22, 2025
b57266c
Add exec.
floitsch Jul 22, 2025
888e875
Port install2 test.
floitsch Jul 22, 2025
0cd5e5a
fix delete.
floitsch Jul 22, 2025
0c096ce
Merge branch 'floitsch/pkg.80' into floitsch/pkg.90
floitsch Jul 22, 2025
18e9090
Merge branch 'master' into floitsch/pkg.20
floitsch Jul 24, 2025
24e0a89
Merge branch 'floitsch/pkg.20' into floitsch/pkg.30
floitsch Jul 24, 2025
6b264d7
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Jul 24, 2025
6437c19
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Jul 24, 2025
faf7639
Merge branch 'floitsch/pkg.50' into floitsch/pkg.60
floitsch Jul 24, 2025
9ff91e1
Merge branch 'floitsch/pkg.60' into floitsch/pkg.70
floitsch Jul 24, 2025
18f0fee
Merge branch 'floitsch/pkg.70' into floitsch/pkg.80
floitsch Jul 24, 2025
ab3fada
Merge branch 'floitsch/pkg.80' into floitsch/pkg.90
floitsch Jul 24, 2025
9acaed6
Also replace '\r' in actual.
floitsch Aug 4, 2025
e152f68
Merge branch 'floitsch/pkg.10' into floitsch/pkg.20
floitsch Aug 4, 2025
0c1e0f9
Merge branch 'floitsch/pkg.20' into floitsch/pkg.30
floitsch Aug 4, 2025
2f28be3
Merge branch 'floitsch/pkg.30' into floitsch/pkg.40
floitsch Aug 4, 2025
b83092d
Merge branch 'floitsch/pkg.40' into floitsch/pkg.50
floitsch Aug 4, 2025
947ee3b
Merge branch 'floitsch/pkg.50' into floitsch/pkg.60
floitsch Aug 4, 2025
e55f460
Merge branch 'floitsch/pkg.60' into floitsch/pkg.70
floitsch Aug 4, 2025
d21b14d
Merge branch 'floitsch/pkg.70' into floitsch/pkg.80
floitsch Aug 4, 2025
531d5b9
Merge branch 'floitsch/pkg.80' into floitsch/pkg.90
floitsch Aug 4, 2025
9f6eca9
Show lock and yaml file for test with new prefix.
floitsch Aug 11, 2025
1c6ac77
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch Aug 11, 2025
53403cf
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch Aug 11, 2025
eb6d153
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch Aug 11, 2025
fc00fa9
Merge branch 'master' into floitsch/pkg.10.gold-tester-win
floitsch Sep 27, 2025
3ee0bee
Merge branch 'floitsch/pkg.10.gold-tester-win' into floitsch/pkg.20.l…
floitsch Sep 27, 2025
834dc65
Merge branch 'floitsch/pkg.20.list-registry' into floitsch/pkg.30.bad…
floitsch Sep 27, 2025
707b51d
Merge branch 'floitsch/pkg.30.bad-registry' into floitsch/pkg.40.search
floitsch Sep 27, 2025
8bc8576
Merge branch 'floitsch/pkg.40.search' into floitsch/pkg.50.git-pkg
floitsch Sep 27, 2025
9ac4355
Merge branch 'floitsch/pkg.50.git-pkg' into floitsch/pkg.60.install-in
floitsch Sep 27, 2025
93fd4d0
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch Sep 27, 2025
c5588ba
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch Sep 27, 2025
3a8b1d0
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch Sep 27, 2025
bd359b0
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch Sep 27, 2025
29b3726
Merge branch 'master' into floitsch/pkg.10.gold-tester-win
floitsch Oct 29, 2025
73d6646
Merge branch 'floitsch/pkg.10.gold-tester-win' into floitsch/pkg.20.l…
floitsch Oct 29, 2025
a8cbb63
Merge branch 'floitsch/pkg.20.list-registry' into floitsch/pkg.30.bad…
floitsch Oct 29, 2025
47d92ec
Merge branch 'floitsch/pkg.30.bad-registry' into floitsch/pkg.40.search
floitsch Oct 29, 2025
8d3d5af
Merge branch 'floitsch/pkg.40.search' into floitsch/pkg.50.git-pkg
floitsch Oct 29, 2025
9486994
Merge branch 'floitsch/pkg.50.git-pkg' into floitsch/pkg.60.install-in
floitsch Oct 29, 2025
019ba00
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch Oct 29, 2025
f3a4803
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch Oct 29, 2025
e017e60
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch Oct 29, 2025
1001fd2
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch Oct 29, 2025
abd1e43
Update pkg.
floitsch Oct 29, 2025
ff4dea1
Merge branch 'floitsch/pkg.10.gold-tester-win' into floitsch/pkg.20.l…
floitsch Oct 29, 2025
80ee0ca
Merge branch 'floitsch/pkg.20.list-registry' into floitsch/pkg.30.bad…
floitsch Oct 29, 2025
797462c
Merge branch 'floitsch/pkg.30.bad-registry' into floitsch/pkg.40.search
floitsch Oct 29, 2025
69b4268
Merge branch 'floitsch/pkg.40.search' into floitsch/pkg.50.git-pkg
floitsch Oct 29, 2025
52c8ef4
Merge branch 'floitsch/pkg.50.git-pkg' into floitsch/pkg.60.install-in
floitsch Oct 29, 2025
20d248f
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch Oct 29, 2025
75bad2d
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch Oct 29, 2025
1a3ce44
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch Oct 29, 2025
6f6c3d3
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch Oct 29, 2025
af4d81a
Update pkg.
floitsch Oct 29, 2025
c9bd7fd
Merge branch 'floitsch/pkg.10.gold-tester-win' into floitsch/pkg.20.l…
floitsch Oct 29, 2025
44249eb
Merge branch 'master' into floitsch/pkg.10.gold-tester-win
floitsch Nov 15, 2025
55d5940
Merge branch 'floitsch/pkg.10.gold-tester-win' into floitsch/pkg.20.l…
floitsch Nov 15, 2025
2927dd5
Merge branch 'floitsch/pkg.20.list-registry' into floitsch/pkg.30.bad…
floitsch Nov 15, 2025
0769f38
Merge branch 'floitsch/pkg.30.bad-registry' into floitsch/pkg.40.search
floitsch Nov 15, 2025
1c0a45f
Merge branch 'floitsch/pkg.40.search' into floitsch/pkg.50.git-pkg
floitsch Nov 15, 2025
72da4a0
Merge branch 'floitsch/pkg.50.git-pkg' into floitsch/pkg.60.install-in
floitsch Nov 15, 2025
32e34b2
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch Nov 15, 2025
5e58dc0
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch Nov 15, 2025
cd6fe8f
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch Nov 15, 2025
871b328
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch Nov 15, 2025
6fabcb2
Remove bad code.
floitsch Nov 15, 2025
2e68f2c
Merge branch 'floitsch/pkg.20.list-registry' into floitsch/pkg.30.bad…
floitsch Nov 15, 2025
8481bd3
Merge branch 'floitsch/pkg.30.bad-registry' into floitsch/pkg.40.search
floitsch Nov 15, 2025
c937418
Merge branch 'floitsch/pkg.40.search' into floitsch/pkg.50.git-pkg
floitsch Nov 15, 2025
dbeac51
Merge branch 'floitsch/pkg.50.git-pkg' into floitsch/pkg.60.install-in
floitsch Nov 15, 2025
a253fd9
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch Nov 15, 2025
1a7e96e
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch Nov 15, 2025
4dcc480
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch Nov 15, 2025
7dd5f6b
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch Nov 15, 2025
cab1afd
Merge branch 'master' into floitsch/pkg.10.gold-tester-win
floitsch Dec 12, 2025
a7ce21d
Merge branch 'floitsch/pkg.10.gold-tester-win' into floitsch/pkg.20.l…
floitsch Dec 12, 2025
a9a512b
Feedback.
floitsch Dec 12, 2025
d3e1303
Merge branch 'master' into floitsch/pkg.20.list-registry
floitsch Dec 12, 2025
f2537d3
Merge branch 'floitsch/pkg.20.list-registry' into floitsch/pkg.30.bad…
floitsch Dec 12, 2025
81b9986
Feedback.
floitsch Dec 12, 2025
12a5bc1
Merge branch 'master' into floitsch/pkg.30.bad-registry
floitsch Dec 12, 2025
9a7ecd1
Merge branch 'floitsch/pkg.30.bad-registry' into floitsch/pkg.40.search
floitsch Dec 12, 2025
610b50b
Merge branch 'master' into floitsch/pkg.40.search
floitsch Dec 12, 2025
c2955d1
Merge branch 'floitsch/pkg.40.search' into floitsch/pkg.50.git-pkg
floitsch Dec 12, 2025
ba31501
Merge branch 'master' into floitsch/pkg.50.git-pkg
floitsch Dec 12, 2025
bac7e55
Merge branch 'floitsch/pkg.50.git-pkg' into floitsch/pkg.60.install-in
floitsch Dec 12, 2025
65f5343
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch Dec 12, 2025
aa33970
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch Dec 12, 2025
29dc156
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch Dec 12, 2025
9fd47c5
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch Dec 12, 2025
f8fc8fd
Merge branch 'master' into floitsch/pkg.60.install-in
floitsch Apr 6, 2026
d512858
Merge branch 'master' into floitsch/pkg.60.install-in
floitsch May 2, 2026
5d91fe3
Merge branch 'master' into floitsch/pkg.60.install-in
floitsch May 2, 2026
9a7c6a8
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch May 2, 2026
db58b8b
Merge branch 'master' into floitsch/pkg.65.prefix-yaml-lock
floitsch May 3, 2026
f584eb8
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch May 3, 2026
2198298
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch May 3, 2026
500f4cd
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch May 3, 2026
901c0bd
Merge branch 'master' into floitsch/pkg.60.install-in
floitsch May 4, 2026
365257d
Merge branch 'floitsch/pkg.60.install-in' into floitsch/pkg.65.prefix…
floitsch May 4, 2026
2a1e21a
Merge branch 'master' into floitsch/pkg.65.prefix-yaml-lock
floitsch May 4, 2026
b1b8656
Merge branch 'floitsch/pkg.65.prefix-yaml-lock' into floitsch/pkg.70.…
floitsch May 4, 2026
47af2f1
Merge branch 'master' into floitsch/pkg.70.install
floitsch May 4, 2026
14d27c7
Merge branch 'floitsch/pkg.70.install' into floitsch/pkg.80.read-only
floitsch May 4, 2026
5b5628d
Merge branch 'master' into floitsch/pkg.80.read-only
floitsch May 4, 2026
f43e5f4
Merge branch 'floitsch/pkg.80.read-only' into floitsch/pkg.90.install2
floitsch May 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions tests/pkg/assets/install2/gold/test.gold
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// No package installed yet.
==================
exec main.toit

STDERR---
<[*WORKING-DIR*]>/package.lock:6:10: error: Package 'http://localhost:<[*PORT*]>/pkg/pkg1-1.0.0' not found
url: 'http://localhost:<[*PORT*]>/pkg/pkg1'
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.toit:5:8: error: Package 'pkg1' for prefix 'pkg1' not found
import pkg1
^~~~
main.toit:8:14: error: Unresolved identifier: 'identify'
print pkg1.identify
^~~~~~~~
Compilation failed
Exit Code: 1
==================
// Just 'install' doesn't add the missing dependencies.
==================
OK
[pkg, install]
==================
== package.lock
prefixes:
pkg1: pkg1

packages:
pkg1:
url: 'http://localhost:<[*PORT*]>/pkg/pkg1'
version: 1.0.0
hash: <[*HASH*]>
==================
// With '--recompute' we get the missing dependencies.
==================
OK
[pkg, install, --recompute]
==================
// Should work now.
==================
exec main.toit
pkg1-1.0.0pkg2-2.4.2pkg3-3.1.2
Exit Code: 0
8 changes: 8 additions & 0 deletions tests/pkg/assets/install2/main.toit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (C) 2025 Toit contributors.
// Use of this source code is governed by a Zero-Clause BSD license that can
// be found in the tests/LICENSE file.

import pkg1

main:
print pkg1.identify
8 changes: 8 additions & 0 deletions tests/pkg/assets/install2/package.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
prefixes:
pkg1: pkg1

packages:
pkg1:
url: 'http://localhost:<[*PORT*]>/pkg/pkg1'
version: 1.0.0
hash: deadbeef1234567890abcdef1234567890abcdef
4 changes: 4 additions & 0 deletions tests/pkg/assets/install2/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
pkg1:
url: http://localhost:<[*PORT*]>/pkg/pkg1
version: ^1.0.0
21 changes: 21 additions & 0 deletions tests/pkg/install2-gold-test.toit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (C) 2025 Toit contributors.
// Use of this source code is governed by a Zero-Clause BSD license that can
// be found in the tests/LICENSE file.

import .gold-tester

main args:
with-gold-tester --with-git-pkg-registry args: test it

test tester/GoldTester:
tester.gold "test" [
["// No package installed yet."],
["exec", "main.toit"],
["// Just 'install' doesn't add the missing dependencies."],
["pkg", "install"],
["package.lock"],
["// With '--recompute' we get the missing dependencies."],
["pkg", "install", "--recompute"],
["// Should work now."],
["exec", "main.toit"],
]
5 changes: 4 additions & 1 deletion tools/pkg/commands/install.toit
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ class InstallCommand extends PkgProjectCommand:

execute:
if not package:
project.install
if recompute:
project.install --recompute=recompute --registries=registries
else:
project.install
else if not local:
execute-remote
else:
Expand Down
7 changes: 6 additions & 1 deletion tools/pkg/project/project.toit
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ class Project:
solve_ --update-everything --registries=registries
save

install -> none:
install --recompute/True --registries/Registries -> none:
solve_ --no-update-everything --registries=registries
save
lock-file.install

install --recompute/bool=false -> none:
lock-file.install

clean -> none:
Expand Down
Loading