Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gleamsver entry for SemVer parsing/comparisons. #99

Merged
merged 1 commit into from
May 22, 2024

Conversation

aznashwan
Copy link
Contributor

I unfortunately can't seem to get gleam run to work so I've defined the package's .toml manually.

@lpil
Copy link
Member

lpil commented May 20, 2024

What happens when you run the program?

@aznashwan
Copy link
Contributor Author

$ 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/[email protected], 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/*?)

@lpil
Copy link
Member

lpil commented May 21, 2024

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.

@aznashwan
Copy link
Contributor Author

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:

  • open the SQLLite DB and insert the entry myself
  • run gleam run
  • commit and PR?

@lpil
Copy link
Member

lpil commented May 21, 2024

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

@aznashwan
Copy link
Contributor Author

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!

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Thank you

@lpil lpil merged commit 37e920b into gleam-lang:main May 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants