gleam-lang/gleam

gleam publish: Get all .gleam files from src, do not using gitignore

Open

#3,153 opened on May 17, 2024

View on GitHub
 (10 comments) (0 reactions) (0 assignees)Rust (960 forks)batch import
help wanted

Repository metrics

Stars
 (21,417 stars)
PR merge metrics
 (Avg merge 10d 19h) (69 merged PRs in 30d)

Description

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.

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?

Contributor guide