That wasn’t a correct assumption to make, ultimately.
I just opened a PR to clarify the
import docs to clarify that
import statements are relative to the file they appear in.
I find this kinda rude. I’m spending time out of my day to help, for free.
I’m glad that we were able to find the misunderstanding though.
I mean, that’s totally dependent on your usecase. It seems you’re trying to do something particularly advanced if you need as many as 20 separate config files. The ease of use will obviously scale with the complexity of your system. That’s not something Caddy (or any other webserver) can magically solve.
That may be true. Caddy v1 made all kinds of assumptions that made it inflexible in many ways. Certain things were completely impossible in Caddy v1. None of the issues with
import you encountered here would have been different in Caddy v1 though,
import worked largely the same way in Caddy v1.
Caddy v2 was a rewrite from the ground up to avoid those assumptions and implement a design based on the learnings of the years prior that would be more flexible and usable for as many usecases as possible.
That’s totally dependent on the usecase, for sure. Some concessions had to be made in v2 to make more things possible. What specifically did you find less intuitive, out of curiosity?
Caddy v2 is much more polished than v1. There’s absolutely no question there. It can do so much more.
I disagree, the docs are very verbose and cover everything you would need to know. I concede the behaviour of
import was not as clear as it should have been, but that’s a very minor issue all things considered.
That’s just an issue of time. Since Caddy v2 was only released 6 months ago, there is definitely less content than the ~4-5 years of content accumulated for Caddy v1. But really, you should look at the date of any issue or article you find to see whether it’s relevant or not. Nothing we can do to help you there.