Skip to content

use '.dagger' as source dir during 'init' and 'develop' when current dir is not empty - #8557

Merged
jedevc merged 1 commit into
dagger:mainfrom
rajatjindal:dagger-source-dir
Oct 24, 2024
Merged

jedevc merged 1 commit into
dagger:mainfrom
rajatjindal:dagger-source-dir

Conversation

@rajatjindal

Copy link
Copy Markdown
Contributor

fixes #8123

@rajatjindal
rajatjindal force-pushed the dagger-source-dir branch 3 times, most recently from 78d12c2 to 6c954e3 Compare September 26, 2024 02:20
@rajatjindal
rajatjindal marked this pull request as draft September 26, 2024 02:45
@rajatjindal
rajatjindal force-pushed the dagger-source-dir branch 4 times, most recently from 0bbd695 to 8b6c72a Compare September 30, 2024 18:13
@rajatjindal
rajatjindal marked this pull request as ready for review October 1, 2024 04:54
Comment thread cmd/dagger/module.go Resolved
@jedevc

jedevc commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

cc @helderco @shykes (you're probably the right people to look at this one)

@jedevc
jedevc requested a review from helderco October 8, 2024 10:45
@shykes

shykes commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

I can't think of anything we'd want to ignore. Worst case we add it later?

@jedevc jedevc 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 🎉 Only a couple nits.

Can you also add a changelog with changie new as well? It's technically a breaking change, so we should explain that.

Comment thread cmd/dagger/module.go Resolved
Comment thread cmd/dagger/module.go Resolved
).
WithWorkdir("/work").
With(daggerExec("init")).
With(daggerExec("init", "--source=.")).

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.

suggestion: could we switch to using With(withModInit) everywhere we do init?

I've wanted to do this for a while, and it'll make changes where we have to update inits everywhere a lot easier. That said, maybe we should merge this one quickly, and maybe follow-up with some test cleanups? I can make a separate issue (cc @marcosnils).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, IMO we should do a follow up for this change. But also not strongly opposed to that if you insist :)

@jedevc jedevc added the needs/changelog Pull requests that require a changelog entry label Oct 21, 2024
@rajatjindal
rajatjindal force-pushed the dagger-source-dir branch 3 times, most recently from 93778d0 to dc9f515 Compare October 21, 2024 10:37
Comment thread core/integration/module_go_test.go Resolved
Comment thread core/integration/module_go_test.go Resolved
@rajatjindal
rajatjindal force-pushed the dagger-source-dir branch 6 times, most recently from 3f28240 to 7980882 Compare October 23, 2024 07:44
Comment thread cmd/dagger/module.go Resolved
Comment thread cmd/dagger/module.go Resolved
@jedevc
jedevc merged commit 8630c2c into dagger:main Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs/changelog Pull requests that require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Daggerizing without littering

4 participants