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

chore: fix go.mod add go.work #1426

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

ccoVeille
Copy link
Contributor

@ccoVeille ccoVeille commented Jan 21, 2025

The relative path in go.mod used in file datasource modules
This caused an error when the repository was named something else than "gofr".

Please note, I'm not even sure there is a logic to use relative path now the dev is over.

Also add missing go.work files
I'm not even sure how the project could be managed without this.
I'm sure there are some part of the CI that could be deleted now the go.work file is present

The path were relative to the root of the project.
This caused an error when the repository was named something else than "gofr".
You can use the following command to sync all go.mod and go.sum files:

$ go work sync
@ccoVeille ccoVeille changed the title chore: fix relative path in go.mod used in file datasource modules chore: fix go.mod add go.work Jan 21, 2025
@ccoVeille
Copy link
Contributor Author

Please note the go test ./... and golangci-lint run are now launched on everything as they should

so the CI about "sub modules" should be removed

Let's talk about it here.

@ccoVeille ccoVeille marked this pull request as draft January 21, 2025 22:09
@ccoVeille
Copy link
Contributor Author

ccoVeille commented Jan 21, 2025

I think the next step should be done:

  • remove the relative path hack in pkg/gofr/datasource/file/*/go.mod
  • remove everything in CI about looking for go.mod files and perform go test or golangci-lint run

Everything works without them now there is a go.work file

https://go.dev/doc/tutorial/workspaces

@ccoVeille
Copy link
Contributor Author

@Umang01-hash could you take back this one

As I told you I'm facing personal issue.

It's just a matter of test.

I would like this to be merged before the following ones:

Code is ready.

@ccoVeille ccoVeille marked this pull request as ready for review January 28, 2025 09:03
@Umang01-hash
Copy link
Member

@Umang01-hash could you take back this one

As I told you I'm facing personal issue.

It's just a matter of test.

I would like this to be merged before the following ones:

Code is ready.

Sure @ccoVeille i will take it up after these PR's are merged.

@ccoVeille
Copy link
Contributor Author

ccoVeille commented Feb 6, 2025

I think the next step should be done:

  • remove the relative path hack in pkg/gofr/datasource/file/*/go.mod
  • remove everything in CI about looking for go.mod files and perform go test or golangci-lint run

Everything works without them now there is a go.work file

https://go.dev/doc/tutorial/workspaces

I'm no longer sure about the next step (at least the second one)

There is an interesting discussion here

go-testfixtures/testfixtures#257 (comment)

That may affect the way the CI changes I was asking to remove might have to stay.

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.

3 participants