gleam
gleam copied to clipboard
gleam publish: Get all .gleam files from src, do not using gitignore
Discussed in https://github.com/gleam-lang/gleam/discussions/3144
Originally posted by RudolfVonKrugstein May 16, 2024 Hi,
I have a problem with publishing and then using it on hex.
- I created this project: https://github.com/RudolfVonKrugstein/gleam_processgroups
- I tested to import the package using "path" form another package, it worked!
- I run
gleam publish
and successfully published it: https://hex.pm/packages/processgroups - I added it to another project:
gleam add processgroups
- I tried to use it:
import processgroups as pg
- gleam does not accept it:
error: Unknown module
┌─ /home/nathan/projects/private/pubsub/src/pubsub.gleam:5:1
│
5 │ import processgroups as pg
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^ Did you mean `process`?
No module has been found with the name `processgroups`.
I have no Idea why.
When I publish, I notice that it only publishes build files, not the source files:
Generated files:
- include/processgroups_GroupMonitor.hrl
- include/processgroups_ProcessJoined.hrl
- include/processgroups_ProcessLeft.hrl
- src/processgroups.app.src
- src/processgroups.erl
Source files:
- LICENSE
- README.md
- gleam.toml
That might be correct, but looking at other packages it seemed to me that hey also publish the .gleam files ...
Hi @RudolfVonKrugstein! Opening an issue for the bug you found.
Do you know how to reproduce this problem? What version of Gleam are you using?