-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
gleam publish: Get all .gleam files from src, do not using gitignore #3153
Comments
Hi,
The steps I described worked for me twice to produce the issue. I feel a littel hesitant to try again, since the packages are not deleteable from hex.pm. But if there something else I should try, let me know! Should gleam have outputed the gleam source file in the under "Source files" when I run |
Thank you.
Hex isn't immutable for the first 24 hours so you can use the nightly version of Gleam with the command
It should, yes. Are you finding this happens for all packages for you? |
Yes, I did try it for different packages: radish > gleam publish
...
Generated files: - src/radish.app.src - src/radish.erl - src/[email protected] - src/[email protected] - src/radish@[email protected] - src/radish@[email protected] - src/radish@[email protected] - src/radish@command@sorted_set.erl - src/[email protected] - src/[email protected] - src/[email protected] - src/[email protected] - src/[email protected] - src/[email protected] - src/[email protected] - src/radish@sorted_set.erl - src/[email protected] - src/[email protected] Source files: - LICENSE - README.md - gleam.toml Name: radish Version: 0.15.0 aw4_request:
httpc:
I also tried it with gleam 1.1.0, nightly and 1.0.0. So I guess it must have to do something with my environment? I am on WSL2, I don't know if that might be related ... |
I discovered something. I compiled gleam locally, trying to find the source of the behavior. I I remove the I don't get why, and will investigate further :) |
Ok, I get it and it has to do with my specific setup. I use a git project manger (gws) to mange my projects and as a result my directory structure look looks like this: projects:
So in short, I have a git project above all my projects, which has a For every project I have a git project in the specific directory. For most tools, that is no problem, as they only care about the first git project they find when going up. But gleam (or the rust function Now, in my opinion that is a bug, as |
I'm not sure I agree that this is a bug, that is how gitignore works and I don't think I want to invent our own semantics for that. That said I don't know why we respect gitignore here in any case. We don't when compiling, so we shouldn't for publishing. |
I agree, that if that is the way .gitignore works, gleam should work that way with gitignore, but is it really? If I run git command in the And if git behaves this way, should a tool like gleam not also behave that way? |
I thought that was how it worked, but apparently not. In that case please open an issue with that particular dependency. |
Here: BurntSushi/ripgrep#2812 |
Ok, ripgrep says this behavior is intended. The options I see are:
I still think, gleam should treat But I understand, that there might be different opinions :). |
Discussed in #3144
Originally posted by RudolfVonKrugstein May 16, 2024
Hi,
I have a problem with publishing and then using it on hex.
gleam publish
and successfully published it: https://hex.pm/packages/processgroupsgleam add processgroups
import processgroups as pg
I have no Idea why.
When I publish, I notice that it only publishes build files, not the source files:
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?
The text was updated successfully, but these errors were encountered: