Skip to content

Conversation

monyarm
Copy link
Collaborator

@monyarm monyarm commented Apr 8, 2024

The goal of this PR is to create a package builder similiar to buildNpmPackage, buildRustPackage, buildGoPackage and others.

A loose summary of necessary subtasks would be:

  • Keep the source code of Dub, so it can later be added as a search path.
  • Create a script (with Nix, dlang or bash), which will download the names and versions of each dub package, generate hashes, and output it to a json file.
  • Create a CI job with a cron job to run weekly, and run the above script, creating a PR when it does.
  • Create a basic buildDubPackage function, which can build dependencyless projects.
  • Add dub.selections.json dependency resolution
  • If dub.selections.json doesn't exist in the repo, require it to be manually supplied.
  • Allow choice of dub version
  • Implement test running
  • Create packages for a number of popular dlang projects, to serve as an example of buildDubPackage
  • Write proper documentation for buildDubPackage
  • Ask @PetarKirov for a code review, and additional suggestions

@dukc
Copy link
Collaborator

dukc commented Apr 8, 2024

Thanks!

First, a question: Did you talk with @PetarKirov before strating doing this or is this your solo initiative? I'm quessing the former since this plan looks much more refined from what I'd expect from anyone just stumbling here.

What you're listing is certainly welcome development, and also something we've been kinda wanting to do. It's also a big effort though, so I ask to support it piece by piece, not all in one go.

Your effort is not totally unexplored territory. There is Dub2Nix tool that serves roughly the same purpose, so my advice is looking at it and preferably using it as a base if practical. It's MIT licensed just like this repo so it's compatible.

@monyarm
Copy link
Collaborator Author

monyarm commented Apr 8, 2024

Thanks!

First, a question: Did you talk with @PetarKirov before strating doing this or is this your solo initiative? I'm quessing the former since this plan looks much more refined from what I'd expect from anyone just stumbling here.

What you're listing is certainly welcome development, and also something we've been kinda wanting to do. It's also a big effort though, so I ask to support it piece by piece, not all in one go.

Your effort is not totally unexplored territory. There is Dub2Nix tool that serves roughly the same purpose, so my advice is looking at it and preferably using it as a base if practical. It's MIT licensed just like this repo so it's compatible.

He asked me to implement a builder function for dub, and ya, I'll probably borrow some parts of dub2nix. I'll be working on it bit by bit outside of work. So it'll probably be at least a week or two before it's finished. But I will ask him when I see him at work for suggestions, and things he thinks should be prioritized.

@dukc
Copy link
Collaborator

dukc commented Apr 13, 2024

Impressive progress so far!

@monyarm monyarm marked this pull request as ready for review April 14, 2024 13:01
@monyarm
Copy link
Collaborator Author

monyarm commented Apr 14, 2024

See #66

@monyarm monyarm closed this Apr 14, 2024
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