go-testfixtures / testfixtures

Ruby on Rails like test fixtures for Go. Write tests against a real database
https://pkg.go.dev/github.com/go-testfixtures/testfixtures/v3?tab=doc
MIT License
1.12k stars 80 forks source link

Remove driver related bloat from `go.mod` #215

Open slsyy opened 4 months ago

slsyy commented 4 months ago

Right now the go.mod contains a lot of dependencies from specific driver libraries. However they are not used at all in the core library, because each implementation use the standard database/sql interface.

Problems with that approach:

Maybe it would be helpful to extract all of the test to separe go.mod within the repo, so the core library is super lean. @andreynering WDYT?

andreynering commented 3 months ago

Hey @slsyy,

I always wanted to solve this problem, but never knew how exactly, and didn't have a lot of time to try.

On other package panagers (Bundler for Ruby, etc) you specify a dependency as being dev or test, so it is ignored on importers, but Go do not have such concept.

If you think having a separate go.mod would work, I'm more than happy to review a pull request for it.

wxiaoguang commented 1 month ago

also: Split database supports into separate packages? #241

ccoVeille commented 3 weeks ago

Maybe it would be helpful to extract all of the test to separe go.mod within the repo, so the core library is super lean

I also think it's a good approach.

ccoVeille commented 3 weeks ago

I also suggested something here

https://github.com/go-testfixtures/testfixtures/issues/241#issuecomment-2466722094

Please tell me if you think it could help