Skip to content

docs: splitting a dagger plan / exporting packages - #2271

Merged
gerhard merged 2 commits into
dagger:mainfrom
grouville:package-manager
May 13, 2022
Merged

gerhard merged 2 commits into
dagger:mainfrom
grouville:package-manager

Conversation

@grouville

@grouville grouville commented Apr 22, 2022 •

Copy link
Copy Markdown
Member

Fixes #2220
Fixes #2186
Fixes #2340

Doc explaining how to install/update dagger/external packages.
It contains 4 docs all inter-related. This should give our users enough knowledge on the subject to be autonomous

Signed-off-by: guillaume

@grouville
grouville requested a review from a team as a code owner April 22, 2022 14:53
@grouville
grouville requested review from TomChv and marcosnils April 22, 2022 14:53

@marcosnils marcosnils left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! left some minor suggestions.

Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved

@TomChv TomChv left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's a great article! I left few comments

I think it would be good to add a section "Publish my package" with a concrete example so users have just to follow steps to publish their own packages.

Maybe you want to do it in another PR regarding your comment :

This is the first one of my serie on the subject. I reduced the scope to avoid losing people along the way

Did you open an issue to track all subjects you want to cover?

Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
Comment thread docs/guides/1236-package-manager.md Resolved
@TomChv TomChv added the area/documentation Improvements or additions to documentation label Apr 25, 2022
@grouville
grouville force-pushed the package-manager branch 2 times, most recently from 1be1ff9 to ce00cc5 Compare April 28, 2022 12:47
@grouville grouville changed the title docs: interacting with the package manager WIP: docs: interacting with the package manager Apr 28, 2022
@grouville grouville changed the title WIP: docs: interacting with the package manager docs: interacting with the package manager Apr 29, 2022
@grouville
grouville requested a review from helderco April 29, 2022 23:55
@grouville

grouville commented Apr 29, 2022 •

Copy link
Copy Markdown
Member Author

When merged, closes #2220 and #2175

@grouville
grouville requested a review from jpadams April 30, 2022 00:04
@grouville grouville changed the title docs: interacting with the package manager docs: interacting with the package manager + splitting a dagger plan using modules, packages + pushing your packages on a repository Apr 30, 2022
dolanor
dolanor previously requested changes May 2, 2022

@dolanor dolanor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it is good documentation. I'm afraid of presenting too many way to do the same thing.
We should, as the creators of the tool, choose for our users what is the best way to split a package and only explain this. Having 2 ways to do the same thing will fragment the help the people can give as they won't be able to help with the other way, and it will fragment the community between the module splitters and the package splitters.

If I understood correctly, and if it follows Go modules/packages, a module is a more complete way of doing things. We should aim for that, no?

@grouville
grouville requested a review from dolanor May 2, 2022 11:44
@grouville

grouville commented May 2, 2022 •

Copy link
Copy Markdown
Member Author

Rebased, fixed all the comments above

@helderco helderco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall I think it's pretty good, I especially like the Theory & Practice approach 🙂

I know you worked hard on this, thanks!

I just have different opinions on what package management should look like. I think the comments explain what I mean but here's a summary:

Two use cases:

  1. Project file organization
  2. Making a reusable package
    1. Explain difference between dagger project vs dagger package
    2. Create new dagger project for developing package if needed (you can develop on top of a real project)
    3. Create repo from the start (or dir to do git init later, the idea is that this is what'll be published)
    4. Choose the remote name to use in imports from the start
    5. Symlink to <project>/cue.mod/user when developing
    6. Just git push to remote with tag, when you're ready to release

As a user, you can always do what you want, but I think this is what we should recommend and focus on.

@grouville

Copy link
Copy Markdown
Member Author

@helderco, I followed your instruction. Can you please review it ? It may not be 100% perfect but follows your guidelines. It is sufficient enough for people to be autonomous

@TomChv
TomChv self-requested a review May 9, 2022 21:30

@TomChv TomChv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That looks awesome, I left few comments but I really like it! 🚀

@helderco helderco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's much simpler/better, thanks 🙂

I just request that the module concept doesn't get hidden inside the dagger project concept.

General nit: use "CUE" instead of "Cue".

@grouville
grouville requested review from TomChv and helderco and removed request for dolanor, jpadams and marcosnils May 10, 2022 13:03
@grouville

Copy link
Copy Markdown
Member Author

@helderco @TomChv, implemented your changes. Also fixes #2186

@helderco helderco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@grouville grouville changed the title docs: interacting with the package manager + splitting a dagger plan using modules, packages + pushing your packages on a repository docs: splitting a dagger plan / exporting packages May 10, 2022
@helderco
helderco dismissed stale reviews from dolanor and marcosnils May 12, 2022 11:34

I think this has been address. It's both much simpler and there's a better distinction between the plan file organization and creating a reusable package.

Explains how to rely on modules to split a Plan

Signed-off-by: guillaume <[email protected]>
@grouville

Copy link
Copy Markdown
Member Author

@gerhard, could you please review it too and merge it if everything looks good to you

@gerhard

gerhard commented May 13, 2022

Copy link
Copy Markdown
Contributor

Looking now.

@gerhard gerhard left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was much needed, thank you for putting in the time @grouville to write these amazing doc pages!

This is 70% and can be merged. If you want to address my comments above, go for it. Addressing them post-merge also works.

Great job! 🙌

Explains how to create reusable packages (for now) + rebase with main

Signed-off-by: guillaume <[email protected]>
@grouville

grouville commented May 13, 2022 •

Copy link
Copy Markdown
Member Author

This was much needed, thank you for putting in the time @grouville to write these amazing doc pages!

This is 70% and can be merged. If you want to address my comments above, go for it. Addressing them post-merge also works.

Great job! 🙌

All the requested changes have been implemented, the PR has been rebased. You can merge if you still approve

@gerhard
gerhard self-requested a review May 13, 2022 14:13

@gerhard gerhard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@gerhard
gerhard merged commit 84f1c23 into dagger:main May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Improvements or additions to documentation

Projects

None yet

6 participants