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

Wrote DUB introduction in index page. #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

renatoathaydes
Copy link
Contributor

I had trouble understanding where DUB lies in comparison with other build tools as I was learning it, so I decided to write an introduction that would've really helped me (and others like me) understand it quickly.

Copy link

netlify bot commented Jan 10, 2024

Deploy Preview for dub-registry ready!

Name Link
🔨 Latest commit f6da8df
🔍 Latest deploy log https://app.netlify.com/sites/dub-registry/deploys/65a02c82878e760008509749
😎 Deploy Preview https://deploy-preview-84--dub-registry.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

docs/index.md Outdated
DUB is a build tool similar to other modern languages build tools like Javascript's [npm](https://www.npmjs.com/)
and Rust's [cargo](https://crates.io/).

A file called `dub.sdl` (or `dub.json`) is used to configure a DUB project.
Copy link
Member

Choose a reason for hiding this comment

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

Technically, that is called the "recipe file"

Copy link
Member

Choose a reason for hiding this comment

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

I would mention the 3 files that drive dub:

  • Recipe file, per project;
  • Selections file, or lock file, tied to a recipe file;
  • Configuration file, which can be at project, user, or system scope;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Configuration file refers to this one? https://dub.pm/dub-reference/settings/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've edited the text to mention all three files.

docs/index.md Outdated

A file called `dub.sdl` (or `dub.json`) is used to configure a DUB project.

> [SDL](https://sdlang.org/) is a "Simple Declarative Language" inspired by D's syntax.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it is inspired by D's syntax though

Copy link
Member

@PetarKirov PetarKirov Jan 11, 2024

Choose a reason for hiding this comment

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

Yes, SDL is an independent project (possibly, but I don't remember, implemented first in a language other than D). After various community members compared different alternatives to JSON, SDL stood out as the one most fitting Dub.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I think I just guessed it :D. I will remove that comment then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed this passage, let me know if it's ok now.

[DUB Configurations](dub-reference/configurations.md) are used to create different variations of a project.

In the above example, all configurations include a dependency on `libasync` because that's declared at the top-level,
but only the `unittest` configuration includes the dependencies `tested` and `dshould`.
Copy link
Member

Choose a reason for hiding this comment

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

Note for yourself: There is a longstanding bug in dub and that is currently not the case. But we intend to fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh... but does the test lib actually get included in the compiled binaries?

@Geod24
Copy link
Member

Geod24 commented Jan 10, 2024

Thanks for taking the time to do this!

docs/index.md Outdated Show resolved Hide resolved
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.

4 participants