-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Clean build directory before preprocessors run instead of after. #1235
Comments
I think this is a duplicate of #1087. It was intentionally changed, and there is some discussion there of possible solutions. It would be nice to have someone would make a proposal. I've only skimmed it, but it looks like there's an interesting discussion of allowing preprocessors to add "resources", which I think would also solve #1222. |
Well I think it should be reverted until there is a solution, otherwise I'll have to pin or maintain a fork of mdbook. It's not a great experience to intentionally break in a patch release. |
I appreciate that it is frustrating when something breaks, but it has been almost 10 months since the change, it would also cause breakage to revert it. I think a more constructive discussion on #1087 would be more fruitful, and provide solutions for everyone. I suspect it is not too difficult to come up with a design for preprocessors to indicate additional resources they want to include. I encourage you (or anyone) to work with @Michael-F-Bryan to come up with some solution, I'd be happy to review. Alternatively, if it is just redirect support, I would be happy to have a first-class solution for that (#430). I know it has come up many times, and would be very valuable. I'd by happy to discuss that, as well. Closing as a duplicate of #1087. |
My problem is not the time scale, it's the fact that this project has no respect for semver, this isn't the first time patch releases have broken forge. |
Breaking compatibility accidentally doesn't mean we are not respecting semver |
|
@XAMPPRocky, how are you generating the redirects? You mention before/after preprocessors, so it sounds like you've written your own The intent behind a Given that design, when a renderer chooses to clear its build directory shouldn't matter, because
I think the best solution would be to incorporate redirects directly into the HTML renderer (as discussed in #430) instead of having to write your own preprocessor. @XAMPPRocky, is that something you would like us to look into implementing? I'll be free tomorrow and the day after so should have plenty of time to implement HTML redirects as a first-class feature. |
I've linked how forge generates redirects in its pre-processor below. I'm not interested in collaborating on a solution, breaking my code has already cost me a good chunk of time and stress dealing with people complaining that forge no longer works. https://github.com/rust-lang/rust-forge/blob/master/blacksmith/src/lib.rs#L131 |
The change shown below introduced a regression in the https://forge.rust-lang.org where the our precessor can no longer generate HTML redirects that we need to maintain compatibility. (rust-lang/rust-forge#336). I would propose to perform the clean step before preprocessors are run.
mdBook/src/renderer/html_handlebars/hbs_renderer.rs
Lines 315 to 318 in 6c4c344
The text was updated successfully, but these errors were encountered: