4 ms·
I think about Go with pleasure until I remember importing. The miseries I've experienced with modules - the way imports are satisfied......just so hard to under
by t43562 5y ago
I think about Go with pleasure until I remember importing. The miseries I've experienced with modules - the way imports are satisfied......just so hard to understand. Built-in support for SCM sites like github (yuck!). Just struggling to put code in a place where some other bit of my code can use it. The C/C++ preprocessor is an abortion and go seems to have made something that solves all the problems I had with that but ends up much worse to use.
- ithkuil 5y agoMy main misery with modules was due to people renaming their GitHub repositories
- jayd16 5y agoFork them (just make a copy you own) so you have control?
- ithkuil 5y agoUsually my problems are with transitive dependencies. I would have to fork quite a few projects to deal with that. I wish there was a more systematic way to do "replace", possibly in libraries as well
- thiht 5y agoThere’s a « replace » directive in go.mod.
- ithkuil 5y agoYeah I know, but it's suboptimal. If you use it your module cannot be "go install" lled, and it doesn't work for libraries
- acchow 5y agoReplace in go.mod breaks `go install`?
- ithkuil 5y agoOh yeah, this used to work but some go version ago it stopped working. See https://github.com/golang/go/issues/44840 https://github.com/golang/go/issues/44840
- jatone 5y agoglad other people see that as a problem as well. it irritates me to no end esp considering possible solutions are fairly straight forward but people can't get buyin from the golang team. for the record it stopped working in go 1.15. 1.14 was the last version it worked in.
- jayd16 5y agoWhats wrong with SCM support?
- turminal 5y agoIt's not easy to get right and they failed which means it works on some sites but not others (they did make sure all the major hosts work though)
- t43562 5y agoWorks with github, doesn't work (for no reason that you can understand at first glance) with the company bitbucket server. There's no programmatic or configuration mechanism I can use to fix it - it needs changes on the server which I cannot make. etc etc.
- deleted 5y ago[deleted]
- jackielii 5y agoNothing is perfect. I focus on solving problems
- thiht 5y agoReally? That’s honestly not an issue I have. My day to day dependency management story is just using go get and go mod tidy. It just works fine, and I work with a fair share of services and dependencies. Can you share some issues you have?
- t43562 5y agoSCM support being baked in, I can't add support for our company git server since I'd need permissions to set it to return some kind of headers which I'm never going to get. Now my code has references to github all over it and no chance to replace that dependency without a massive code change - something that may not be even practical. The "replace" directive .... ha ha ha. Never got it to work for me - a total joke. Obviously it must work in some simple situation but apparently not mine. The misery of trying to fork a library or just the subcomponent of that library that I need to change and use. The strange special directories (internal, vendor, ....) WTF is a "package" really and how does that relate to where you put code? It just seems to be a complete disconnect with where you put things or how you import them and is very confusing. executables having to be alone in their own cmd directory. Essentially that I hit mysterious import related problems that require continual careful reading of the docs to work out what I'm falling foul of. Working out what is the real difference between GOPATH and GOROOT - you can read the docs many many times without understanding the straightjacket that the wise Go developers think should fit everyone and so you get problem after problem until you start to understand why "computer says no." Creating read-only files in your home account so that you cannot "blow away" (without some trouble) the caching that is hiding or causing your latest module importing problem. Sorry, the whole business is a great non-joy to have to deal with.