hlandau / dexlogconfig

Personal policy and configuration package for xlog.
1 stars 1 forks source link

journal package has moved #7

Open JeremyRand opened 1 year ago

JeremyRand commented 1 year ago

https://github.com/hlandau/dexlogconfig/blob/86a3fc314fe7a8d9d58005220de8e2a85dd5744f/syslogconfig.go#L10

github.com/coreos/go-systemd/journal seems to have moved to github.com/coreos/go-systemd/v22/journal if I'm interpreting logs correctly. If that's correct, any chance the import can be fixed in this repo?

hlandau commented 1 year ago

The correct strings for if modules are enabled or disabled are different. Yes, the design of Go modules is hilariously bad in this regard. The Go team refused to even provide a build tag to distinguish whether modules are on or off. When pressed on this particular issue of needing different import paths due to the very decisions they made, they as I recall literally proposed just vendoring the package... I'm not making this up.

Anyway, the problem here is that it's literally designed so that in this circumstance, I have to either screw people with modules off or screw people with modules on. That's not OK to me.

I had some theories it's possible to construct a bizarro package which can effectively sense whether modules are on or off (modules on -> get latest tag, modules off -> get master), and declare forwards of all symbols to the right import paths in each case. I was meaning to do this for acmetool but haven't gotten around to it.

JeremyRand commented 1 year ago

I see. Ugh, what a mess. And yeah, breaking shit when modules are turned off is a nonstarter, especially since ncdns-repro/tor-browser-build has modules turned off. I'll do some experiments and see how miserable a build script workaround will be.

JeremyRand commented 1 year ago

(Let's leave this issue open until we converge on a workaround.)

JeremyRand commented 1 year ago

I worked around it with this piece of braindamage. I don't like doing this, but it's not conceptually very far off from what RBM does anyway, and I don't think NLnet wants to waste their money on paying me to spend any more time on this. Let me know if you find a less painful solution.

JeremyRand commented 6 months ago

FYI I'm checking with the Debian Go Team about what they find minimally bad here.