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

fix: use source-subdir in go-use plugin #980

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

Conversation

tigarmo
Copy link
Contributor

@tigarmo tigarmo commented Jan 17, 2025

It's possible, and somewhat common, for a go module to be defined inside a repo's subdir; in this case we can define source-subdir, but the go-use plugin needs to use this - otherwise the repo root gets used.

Fixes #978

  • Have you signed the CLA?
  • Have you added an entry to the changelog (docs/reference/changelog.rst)?

It's possible, and somewhat common, for a go module to be defined inside a
repo's subdir; in this case we can define source-subdir, but the go-use
plugin needs to use this - otherwise the repo root gets used.

Fixes #978
@tigarmo tigarmo requested review from sergiusens and a team January 17, 2025 15:55
@tigarmo tigarmo requested review from lengau and removed request for a team January 17, 2025 16:54
@@ -100,5 +100,5 @@ def get_build_commands(self) -> list[str]:
)

return [
f"go work use {self._part_info.part_src_dir}",
f"go work use {self._part_info.part_src_subdir}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain to me why these are the source dir/subdir and not the build dir/subdir? It's not a blocker for this, it's just that the latter makes more sense to me.

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 don't know actually
@sergiusens ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

in the before times, src was not copied of to build

Copy link
Contributor

@lengau lengau left a comment

Choose a reason for hiding this comment

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

Good catch, thanks!

And thanks for undoing my changelog mistake.

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.

go-use plugin doesn't respect source-subdir
3 participants