Closed aznashwan closed 4 months ago
What happens when you run the program?
$ gleam run
Compiled in 0.03s
Running awesome.main
Downloading package index database
Writing new package config files
Loading config files
exception error: #{function => <<"read_config">>,line => 184,
message => <<"Assertion pattern match failed">>,
module => <<"awesome">>,
value => {error,{not_found,[<<"name">>]}},
gleam_error => let_assert}
in function awesome:read_config/1 (/Users/nashwan/Documents/Coding/Gleam/awesome-gleam/build/dev/erlang/awesome/_gleam_artefacts/awesome.erl, line 81)
in call from gleam@list:do_map/3 (/Users/nashwan/Documents/Coding/Gleam/awesome-gleam/build/dev/erlang/gleam_stdlib/_gleam_artefacts/gleam@list.erl, line 119)
in call from awesome:main/0 (/Users/nashwan/Documents/Coding/Gleam/awesome-gleam/build/dev/erlang/awesome/_gleam_artefacts/awesome.erl, line 306)
Note that this didn't happen the first time I executed gleam run
and the only thing I've added is the file in this PR so I'm not sure what the cause might have been.
I've noticed that after running gleam run
there's quite a lot of new files generated in packages/*.toml
fwiw. (am guessing the come from the embedded SQLLite DB and someone forgot to run gleam run
so they're not in packages/*
?)
I've noticed that after running gleam run there's quite a lot of new files generated in packages/.toml fwiw. (am guessing the come from the embedded SQLLite DB and someone forgot to run gleam run so they're not in packages/?)
No, it is gleam run
that generates these packages from the packages.gleam.run database.
The error you are having is that one of the configs read does not have a name
property. Perhaps you could print the string read on line 181 and see what you get.
The error you are having is that one of the configs read does not have a name property. Perhaps you could print the string read on line 181 and see what you get.
Sadly I had removed all the generated TOMLs and now I can't get it to reproduce anymore, but I guess one must've been missing the key as you said, though I'm 99% sure it wasn't caused by the one I added (it had a name
from the very start)
No, it is gleam run that generates these packages from the packages.gleam.run database.
So the committing process should go like:
gleam run
Sadly I had removed all the generated TOMLs and now I can't get it to reproduce anymore, but I guess one must've been missing the key as you said, though I'm 99% sure it wasn't caused by the one I added (it had a name from the very start)
The ones in the repo are all valid so it'll have been some edit you may have accidentally made.
So the committing process should go like:
Nope, the instructions are here: https://github.com/gleam-lang/awesome-gleam?tab=readme-ov-file#awesome-gleam
Looking over the actual code, it just hit me that it automatically pulls in published package info from Hex (including mine), so I simply added the category to it.
Sorry for the confusion!
I unfortunately can't seem to get
gleam run
to work so I've defined the package's .toml manually.