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 new release artifact x86_64-unknown-linux-musl #834

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

andros21
Copy link
Contributor

@andros21 andros21 commented Dec 13, 2023

Hi, thanks for stylua formatter! I use it a lot within neovim.

The aim of this PR is to support distro like Alpine Linux (on amd64 arch),
building and attaching a new artifact for the target x86_64-unknown-linux-musl
when releasing with release.yml workflow

From local tests, the build process for this new target finished without errors ... only one warning

 warning: dropping unsupported crate type `cdylib` for target `x86_64-unknown-linux-musl`

related to the [lib] part of Cargo.toml

Let me know if I need to do something ... maybe trigger some CI to test stylua works also for this new target

@JohnnyMorganz
Copy link
Owner

Sorry for the delay, and thanks for the contribution!

The only thing I am worried about here is the format of the name. Unfortunately we didn't leave much flexibility in the way the artifact name is structured, and I know many tools hardcode the structure to determine what asset to download. We do this ourselves in multiple places:

And we will need to make sure this new package name doesn't affect those at the minimum, let alone the third party packagers (but it is impossible to control all of them).

But..., the concern here is only that these tools don't accidently pick up the new artifact, and just use the current ones still. So, we just need to structure it in that way. I think maybe stylua-linux-x86_64-musl might be better instead to not hit a few of those regexes.

@andros21
Copy link
Contributor Author

Fully agree. I was not aware of this jungle of regexes 😅
Now I change it

What do you think instead to move the alias artifact-alias: stylua-linux now linked with linux-gnu target to the new linux-musl target? It should be more portable on linux platforms cause statically compiled against musl-libc, a minimum version of glibc is not needed

@JohnnyMorganz
Copy link
Owner

I think we should leave the alias for now. The alias artifact is actually deprecated and I intend to remove it at the next major release.

Copy link

codecov bot commented Dec 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5de9a1d) 97.02% compared to head (92864c2) 97.03%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #834   +/-   ##
=======================================
  Coverage   97.02%   97.03%           
=======================================
  Files          16       16           
  Lines        5989     5995    +6     
=======================================
+ Hits         5811     5817    +6     
  Misses        178      178           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@JohnnyMorganz JohnnyMorganz 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! I don't anticipate any problems, but let's see at the next release. If something comes up, I can just remove the zip from the release artifacts temporarily.

@JohnnyMorganz JohnnyMorganz merged commit 94375ed into JohnnyMorganz:main Dec 30, 2023
17 of 19 checks 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