Skip to content

Comments

Split dev dependencies into separate modules#1788

Draft
piotrpio wants to merge 4 commits intomainfrom
split-dev-dependencies
Draft

Split dev dependencies into separate modules#1788
piotrpio wants to merge 4 commits intomainfrom
split-dev-dependencies

Conversation

@piotrpio
Copy link
Collaborator

Signed-off-by: Piotr Piotrowski piotr@synadia.com

@coveralls
Copy link

coveralls commented Jan 23, 2025

Coverage Status

coverage: 85.35% (+0.08%) from 85.272%
when pulling 2e756a7 on split-dev-dependencies
into b9f59ec on main.

@piotrpio piotrpio force-pushed the split-dev-dependencies branch 2 times, most recently from d00aaba to 3428b6e Compare January 24, 2025 08:40
go.mod Outdated
github.com/nats-io/nkeys v0.4.9
github.com/nats-io/nuid v1.0.1
golang.org/x/text v0.21.0
google.golang.org/protobuf v1.36.2
Copy link
Member

Choose a reason for hiding this comment

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

would this one be needed if we put a go.mod under encoders?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not really under encoders - enc.go imports encoders/builtin, so even if we put it in a separate module, it would have to be added to root go.mod (with protobuf as an indirect dependency), so does not make sense.

We could in theory make encoders/protobuf a separate module but then we'd have to release and version it separately, not sure it's a good solution.

Copy link
Member

Choose a reason for hiding this comment

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

ah I see, thanks for checking

@eikemeier
Copy link

Why is this a good idea? Who else does it this way?

@alexbozhenko
Copy link
Member

I guess that's because we do not want circular dependency between server and nats.go.
And nats.go import server for tests
https://go.dev/wiki/Modules#why-does-go-mod-tidy-record-indirect-and-test-dependencies-in-my-gomod

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio force-pushed the split-dev-dependencies branch from 3428b6e to 2e756a7 Compare February 9, 2026 15:10
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.

5 participants