-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop manipulating --public-url
, and provide a default that works in most cases.
#668
Comments
Without having checked, I believe an implementation of this should be rather easy. Having a PR ready for testing would allow people to check upfront and see what might be the impact of this change. I guess it would be a candidate for |
Judging from #674, this issues feels a bit more complicated. Maybe let's go back to the drawing board for a second and try do find out what the best approach is. From what I see, right now that information is used in two ways:
For the first case I think having a For the second case I believe a relative URL will never work for So we could change this into the following behavior:
What do you think? |
I've been hit by this and went through some of the already open issues. Reading from #697:
it does sound like using the same exact option to have a different meaning depending on the operation (build vs serve) may be the reason for some of the pain experienced. Perhaps there could be a Perhaps in some scenarios one can be derived from the other, but not in all scenarios. |
Nice summary, and absolutely true. Maybe having a good (helpful) error message in the I guess all that it needs is to write it down. Think it through. And come up with a PR which can be tested for those various scenarios. |
This change introduced the idea of the three different base URLs: * The public base/common prefix, when generating links * The "serve base", when serving content using `trunk serve` * The "websocket base", where the auto-reload websocket connects to The sane default still is to use an absolute --public-url, defaulting to `/`. However, each of the URLs/bases can be overridden when necessary. Closes: trunk-rs#668, trunk-rs#626
Nice change here ... But this surprised me today when my webpage suddenly broken with same command 😢 |
I assume you've upgraded to trunk 0.19.0, which is a breaking change version. |
specifying an absolute URL as the public base is necessary since trunk 0.19 see also trunk-rs/trunk#668
specifying an absolute URL as the public base is necessary since trunk 0.19 see also trunk-rs/trunk#668
In this comment, @ctron suggested that addressing the core problem that led to #320 with breaking changes might be a good idea. If that's allowable, then I have a simple proposal:
--public-url
default to.
..
and/
are equivalent./
s to explicitly-typed--public-url
s./
, they can type one. To insert one without asking is confusing and unnecessary.The text was updated successfully, but these errors were encountered: