Oh thanks a lot Carla Pfaff! I did not even know a v0.0.0-unpublished pseudo-version existed. It is not mentioned in the Go Modules Reference https://golang.org/ref/mod for whatever reason. This really takes the edge off.
I was also pointed at the replace by some people on StackOverflow and while I could swear that it did not work for me last week, when I create a fresh example project and use a replace it really deos seem to use my local changes, no matter what version is specified in the require statement. I am not sure how this all works, all I know is that Go modules are really really complicated, the most complicated thing about Go right now in my opinion. I loved Go because of its simplicity and while I really value the option to have reproducible builds - as this has been a pain point for me as well - this solution is way to complex for my taste. Maybe this complexity is inherent to the problem, maybe not, I do not know as I have not created a dependency tool like this myself. All I know is that it is really hard to use and makes creating Go code harder overall. On Friday, April 9, 2021 at 6:20:46 PM UTC+2 Carla Pfaff wrote: > On Friday, 9 April 2021 at 17:38:12 UTC+2 gonutz wrote: > >> I could create a local commit to the library or create a new debug branch >> in my local copy of the library. Then I insert my debug code and commit it. >> Then I point my main program's go.mod file at the new commit/branch, adding >> a replace along the way to use my local copy. Then when I am done debugging >> I roll everything back. This works but is very annoying for just a >> temporary print statement here and there. >> > > Use the local replace with the v0.0.0-unpublished pseudo-version number, > then you don't have to commit and roll back all the time. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/15294d2c-bc5f-4be1-85bb-6aeb961e07bcn%40googlegroups.com.