Skip to content

chore: Isolate pkgerrors and drop pkg/errors from main module - #793

Open
aziret wants to merge 1 commit into
rs:masterfrom
aziret:feature/move-marshalstack
Open

chore: Isolate pkgerrors and drop pkg/errors from main module#793
aziret wants to merge 1 commit into
rs:masterfrom
aziret:feature/move-marshalstack

Conversation

@aziret

@aziret aziret commented Aug 24, 2026

Copy link
Copy Markdown

This PR removes github.com/pkg/errors as a dependency from the main part of the library and extracts dependency on github.com/pkg/errors to an external pkg

This PR also tries to address the issue 470 from the main repo

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

why adding this extra file path level?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Usually external packages are located in /pkg

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The main part of the library is no longer dependant on github.com/pkg/errors
Only users of package pkgerrors will have this transitive dependency on github.com/pkg/errors

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes, I understand that part. I’m just wondering why we couldn’t add the go.mod and go.sum files to the package's current location. I couldn't find any convention recommending a pkg directory for this use case.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm just used to moving external packages into /pkg and automatically did this 😄

Reverted my changes back and added module in pkgerrors

@aziret
aziret force-pushed the feature/move-marshalstack branch from 1597f02 to 9654f14 Compare August 24, 2026 15:54
@aziret aziret changed the title feat: Move MarshalStack to external pkg chore: Isolate pkgerrors and drop pkg/errors from main module Aug 24, 2026
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.

2 participants