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

asls: init at 0.4.0 #91133

Merged
merged 2 commits into from Jul 3, 2020
Merged

asls: init at 0.4.0 #91133

merged 2 commits into from Jul 3, 2020

Conversation

saulecabrera
Copy link
Member

@saulecabrera saulecabrera commented Jun 19, 2020

Motivation for this change

Add a new package for the AssemblyScript Language Server

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@saulecabrera
Copy link
Member Author

/marvin opt-in

@marvin-mk2
Copy link

marvin-mk2 bot commented Jul 1, 2020

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@marvin-mk2 marvin-mk2 bot added the marvin label Jul 1, 2020
@saulecabrera
Copy link
Member Author

/status needs_review

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/207

Copy link
Contributor

@danieldk danieldk left a comment

Choose a reason for hiding this comment

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

I have added an initial set of comments. Thanks for your first submission!

pkgs/development/tools/misc/asls/default.nix Outdated Show resolved Hide resolved
Comment on lines 11 to 13
src = fetchurl {
url = "https://github.com/saulecabrera/asls/releases/download/v0.3.0/bin.tar.gz";
sha256 = "01d6v79zqw62pkv33km090nyn78zxr0vs3yvnw24ykysvqjyaqd3";
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not build from source?

Copy link
Member Author

Choose a reason for hiding this comment

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

Two main reasons why I went with this approach:

  • The available tools for the BEAM seem to have several drawbacks not suited for this package:
    • buildHex: requires the package to be published in https://hex.pm/ which is not the case for asls
    • buildMix: requires the package to be a library,aslsis an application (BEAM CLI application)
  • The other option is to run mix commands during the build phase, that works and that was my initial approach, but that breaks sandboxing (a similar case can be found in this thread: https://discourse.nixos.org/t/question-about-packaging-elixirls/4056)

Until there is a more mature built-in approach I believe this is the most straightforward way in this particular case.

pkgs/development/tools/misc/asls/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/misc/asls/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/misc/asls/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/misc/asls/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@danieldk danieldk left a comment

Choose a reason for hiding this comment

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

Didn't mean to approve, sorry ;).

@saulecabrera
Copy link
Member Author

Thanks for your initial comments @danieldk. I've polished the PR, it's ready for another round of reviews.

@danieldk
Copy link
Contributor

danieldk commented Jul 1, 2020

Thanks for your initial comments @danieldk. I've polished the PR, it's ready for another round of reviews.

Thanks, I am afraid that I cannot add further comments, since I am not familiar with the Erlang ecosystem. So, I think at this point it's best to wait for someone with Erlang experience to do another review.

@danieldk danieldk requested review from danieldk and removed request for danieldk July 1, 2020 17:49
@saulecabrera
Copy link
Member Author

So, I think at this point it's best to wait for someone with Erlang experience to do another review.

Agreed.

@DianaOlympos would you have some time for a review? (Apologies for randomly pinging you, but I've noticed that you have been very involved in Nix <> BEAM conversations, if that's not the case, please disregard this message 😄)

@DianaOlympos
Copy link
Contributor

I don't see anything problematic here.

Does remind me i need to bring erlang 23 though.

LGTM

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

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

Just one small nit, other than that looks good to me.

pkgs/development/tools/misc/asls/default.nix Outdated Show resolved Hide resolved
@saulecabrera saulecabrera changed the title asls: init at 0.3.0 asls: init at 0.4.0 Jul 3, 2020
Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

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

Looks good to me now (pending ofBorg's approval), welcome to the team!

@timokau timokau merged commit 1c818b0 into NixOS:master Jul 3, 2020
@saulecabrera saulecabrera deleted the add-asls branch July 3, 2020 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants