Thanks @thomashoneyman for the write-up!
Great, appreciated!
I assume this should be run in a checkout of GitHub - purescript/registry-dev: Development work related to the PureScript Registry? If so, that doesn’t seem to be working on my end for some reason:
$ git branch -v
* master 466146b Add Nix builds for the full registry (#619)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
$ nix develop --command registry-importer dry-run
/tmp/nix-shell.yvutDM: line 1852: exec: registry-importer: not found
$ ll -d /nix/store/*purescript-registry*/
dr-xr-xr-x 3 root root 4096 Dec 31 1969 /nix/store/pxqrq8q5j3ksca2an2dkzy9y9ilmv5gj-purescript-registry/
$ ll /nix/store/pxqrq8q5j3ksca2an2dkzy9y9ilmv5gj-purescript-registry/
total 8
lrwxrwxrwx 1 root root 84 Dec 31 1969 bin -> /nix/store/pxqrq8q5j3ksca2an2dkzy9y9ilmv5gj-purescript-registry/node_modules/js/.bin
dr-xr-xr-x 10 root root 4096 Dec 31 1969 js
$ ll /nix/store/pxqrq8q5j3ksca2an2dkzy9y9ilmv5gj-purescript-registry/node_modules/js/.bin
ls: cannot access '/nix/store/pxqrq8q5j3ksca2an2dkzy9y9ilmv5gj-purescript-registry/node_modules/js/.bin': No such file or directory
$
I don’t know if that’s expected or not (recent changes in the command line params?). I was able to run it with:
$ nix develop
$ GITHUB_TOKEN=xxx nix run -- .#legacy-importer dry-run
which seemed to work.
So looking at purescript-sequences
again, here’s what I see in the logs:
$ rg sequences legacy-importer-2023-07-14T06\:18\:09.log|head -n50
[2023-07-14T06:21:19.278Z INFO] Processing sequences
[2023-07-14T06:21:19.278Z DEBUG] Listing tags for hdgarrood/purescript-sequences
[2023-07-14T06:21:19.278Z DEBUG] No cache entry found for GET /repos/hdgarrood/purescript-sequences/tags in memory.
[2023-07-14T06:21:19.279Z DEBUG] Fell back to on-disk entry for GET /repos/hdgarrood/purescript-sequences/tags
[2023-07-14T06:21:19.280Z DEBUG] Wrote cache entry for GET /repos/hdgarrood/purescript-sequences/tags in memory.
[2023-07-14T06:21:19.281Z DEBUG] Found cache entry but it was modified more than 4 hours ago, refetching GET /repos/hdgarrood/purescript-sequences/tags
[2023-07-14T06:21:19.281Z DEBUG] Making request to GET /repos/hdgarrood/purescript-sequences/tags
[2023-07-14T06:21:19.436Z DEBUG] Wrote cache entry for GET /repos/hdgarrood/purescript-sequences/tags in memory.
[2023-07-14T06:21:19.437Z DEBUG] Wrote cache entry for Request__GET /repos/hdgarrood/purescript-sequences/tags at path scratch/.cache/Request__GET___repos_hdgarrood_purescript-sequences_tags as JSON.
[2023-07-14T06:22:32.605Z DEBUG] No cache entry found for PublishFailureCache__sequences__3.0.2 in memory.
[2023-07-14T06:22:32.605Z DEBUG] No cache file found for PublishFailureCache__sequences__3.0.2 at path scratch/.cache/PublishFailureCache__sequences__3.0.2
... <other versions>
I see the relevant files there:
$ fd sequences scratch
scratch/registry/metadata/sequences.json
scratch/registry-index/se/qu/sequences
and the latest version 3.0.2 listed in all:
$ tail -n+1 $(fd sequences scratch scratch/.cache)|rg '^==|3.0.2'
==> scratch/.cache/Request__GET___repos_hdgarrood_purescript-sequences_tags <==
"name": "v3.0.2"
"sha": "6a68dda0c9dc77d2cdb9caf890a68983343d0e26",
"url": "https://api.github.com/repos/hdgarrood/purescript-sequences/commits/6a68dda0c9dc77d2cdb9caf890a68983343d0e26"
==> scratch/registry/metadata/sequences.json <==
"3.0.2": {
"ref": "v3.0.2"
==> scratch/registry-index/se/qu/sequences <==
{"name":"sequences","version":"3.0.2","license":"MIT","location":{"githubOwner":"hdgarrood","githubRepo":"purescript-sequences"},"description":"An efficient, general purpose sequence type.","dependencies":{"arrays":">=6.0.0 <7.0.0","assert":">=5.0.0 <6.0.0","console":">=5.0.0 <6.0.0","effect":">=3.0.0 <4.0.0","lazy":">=5.0.0 <6.0.0","maybe":">=5.0.0 <6.0.0","newtype":">=4.0.0 <5.0.0","nonempty":">=6.0.0 <7.0.0","partial":">=3.0.0 <4.0.0","prelude":">=5.0.0 <6.0.0","profunctor":">=5.0.0 <6.0.0","psci-support":">=5.0.0 <6.0.0","tuples":">=6.0.0 <7.0.0","unfoldable":">=5.0.0 <6.0.0","unsafe-coerce":">=5.0.0 <6.0.0"}}
At this point, I’m not sure what to look for to see why it’s failing from the logs themselves.
Now purescript-sequences
might have an issue with 0.15.x based on the latest github actions result:
which seems to have failed for the 0.15.4 compiler version (logs have been purged, so unfortunately not able to confirm more). So let’s assume purescript-sequences
are not buildable on 0.15.x as the reason.
However, let’s take purescript-rationals
as another example. The latest version is 6.0.0 and based on the logs it builds fine with 0.15.9:
2023-05-12T11:01:51.7507030Z ##[group]Run purescript-contrib/setup-purescript@main
2023-05-12T11:01:51.7507316Z with:
2023-05-12T11:01:51.7507500Z purescript: latest
2023-05-12T11:01:51.7507703Z spago: latest
2023-05-12T11:01:51.7507894Z psa: latest
2023-05-12T11:01:51.7508073Z ##[endgroup]
2023-05-12T11:01:51.9730257Z Fetching latest stable tag for purs
2023-05-12T11:01:51.9835490Z Fetching latest stable tag for spago
2023-05-12T11:01:51.9889518Z Fetching latest stable tag for psa
2023-05-12T11:01:51.9931740Z Constructed build plan.
2023-05-12T11:01:51.9962861Z Fetching purs
2023-05-12T11:01:52.2791238Z [command]/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/152d3067-bbd0-411e-a149-6b1949f8a37a -f /home/runner/work/_temp/8443089a-6c6b-4671-ae9f-55aa9faea50d
2023-05-12T11:01:52.7016848Z Cached path /opt/hostedtoolcache/purs/0.15.9/x64, adding to PATH
2023-05-12T11:01:52.7022145Z Fetching spago
2023-05-12T11:01:52.9679856Z [command]/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/a59f8c63-4bc8-4fd3-9329-4c72b6e0e1de -f /home/runner/work/_temp/8b8987bc-73a6-4b5e-bd2a-11781e1781fa
2023-05-12T11:01:53.3166745Z Cached path /opt/hostedtoolcache/spago/0.21.0/x64, adding to PATH
2023-05-12T11:01:53.3167598Z Fetching psa
2023-05-12T11:01:53.3200795Z [command]/usr/bin/sudo npm install -g purescript-psa@0.8.2
2023-05-12T11:01:54.4210227Z
2023-05-12T11:01:54.4210725Z added 1 package in 448ms
2023-05-12T11:01:54.4279873Z Fetched tools.
so that should not be the issue. It seems to have been imported fine as well: Update rationals · Issue #269 · purescript/registry · GitHub, including the github action: Update rationals · purescript/registry@b71089a · GitHub build succeeding.
One thing I noticed is this:
$ rg 'rationals.*(0.1.0|5.0.1|6.0.0)' legacy-importer-2023-07-14T06\:18\:09.log
17028:[2023-07-14T06:20:58.155Z DEBUG] Did not find manifest for rationals@0.1.0 in memory cache or local registry repo checkout.
17029:[2023-07-14T06:20:58.155Z DEBUG] No cache entry found for ImportManifest__rationals__v0.1.0 in memory.
17030:[2023-07-14T06:20:58.156Z DEBUG] Fell back to on-disk entry for ImportManifest__rationals__v0.1.0
17031:[2023-07-14T06:20:58.156Z DEBUG] Wrote cache entry for ImportManifest__rationals__v0.1.0 in memory.
26815:[2023-07-14T06:22:32.576Z DEBUG] No cache entry found for PublishFailureCache__rationals__6.0.0 in memory.
26816:[2023-07-14T06:22:32.577Z DEBUG] No cache file found for PublishFailureCache__rationals__6.0.0 at path scratch/.cache/PublishFailureCache__rationals__6.0.0
26817:[2023-07-14T06:22:32.577Z DEBUG] No cache entry found for PublishFailureCache__rationals__5.0.1 in memory.
26818:[2023-07-14T06:22:32.577Z DEBUG] No cache file found for PublishFailureCache__rationals__5.0.1 at path scratch/.cache/PublishFailureCache__rationals__5.0.1
31229:[2023-07-14T06:22:33.607Z DEBUG] No cache entry found for PublishFailureCache__base-rationals__0.1.0 in memory.
31230:[2023-07-14T06:22:33.607Z DEBUG] No cache file found for PublishFailureCache__base-rationals__0.1.0 at path scratch/.cache/PublishFailureCache__base-rationals__0.1.0
I.e. it imported 0.1.0, but not 5.0.1 (which is in the latest package set) 0.6.0. I’ve tried removing files (*rationals*
) from .cache - is there a better way to repeat only a single package from scratch? - and repeating and now it’s a bit different:
$ rg 'Import.*_rationals.*(0.1.0|5.0.1|6.0.0)' legacy-importer-2023-07-14T06\:51\:02.log
14435:[2023-07-14T06:51:38.606Z DEBUG] No cache entry found for ImportManifest__rationals__v5.0.1 in memory.
14436:[2023-07-14T06:51:38.607Z DEBUG] No cache file found for ImportManifest__rationals__v5.0.1 at path scratch/.cache/ImportManifest__rationals__v5.0.1
14472:[2023-07-14T06:51:40.905Z DEBUG] Wrote cache entry for ImportManifest__rationals__v5.0.1 in memory.
14473:[2023-07-14T06:51:40.908Z DEBUG] Wrote cache entry for ImportManifest__rationals__v5.0.1 at path scratch/.cache/ImportManifest__rationals__v5.0.1 as JSON.
15036:[2023-07-14T06:51:57.942Z DEBUG] No cache entry found for ImportManifest__rationals__v0.1.0 in memory.
15037:[2023-07-14T06:51:57.943Z DEBUG] No cache file found for ImportManifest__rationals__v0.1.0 at path scratch/.cache/ImportManifest__rationals__v0.1.0
15066:[2023-07-14T06:51:58.916Z DEBUG] Wrote cache entry for ImportManifest__rationals__v0.1.0 in memory.
15067:[2023-07-14T06:51:58.917Z DEBUG] Wrote cache entry for ImportManifest__rationals__v0.1.0 at path scratch/.cache/ImportManifest__rationals__v0.1.0 as JSON.
but still no 6.0.0 there.
I don’t see 6.0.0 in version-failures.json either - the latest is 0.3.1:
$ <version-failures.json jq .rationals
{
"v0.1.0": {
"reason": "Legacy manifest could not be parsed.",
"tag": "InvalidManifest",
"value": "MissingLicense"
},
"v0.1.1": {
"reason": "Legacy manifest could not be parsed.",
"tag": "InvalidManifest",
"value": "MissingLicense"
},
"v0.1.2": {
"reason": "Legacy manifest could not be parsed.",
"tag": "InvalidManifest",
"value": "MissingLicense"
},
"v0.2.0": {
"reason": "Legacy manifest could not be parsed.",
"tag": "InvalidManifest",
"value": "MissingLicense"
},
"v0.3.0": {
"reason": "Legacy manifest could not be parsed.",
"tag": "InvalidManifest",
"value": "MissingLicense"
},
"v0.3.1": {
"reason": "Legacy manifest could not be parsed.",
"tag": "InvalidManifest",
"value": "MissingLicense"
}
}
Does it have anything to do with bower.json
being removed from purescript-rationals
? Use BigInt instead of Int (#42) · purescript-contrib/purescript-rationals@d85ddb5 · GitHub
What would be the next step in troubleshooting?