-
Notifications
You must be signed in to change notification settings - Fork 112
Vendor multipart, resolve FCWs, and prepare to republish
#293
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
Conversation
…d_macro_def Remove unused macro definition
… unaccessible super; add entry API to local_test
…t for multiple files per field name
upgrade mime & mime_guess to latest version
rand<0.7 depends on rand_core 0.3 which suffers from https://rustsec.org/advisories/RUSTSEC-2019-0035
…TSEC-2019-0035 Bump rand to 0.7 to address RUSTSEC-2019-0035
Update iron URL
Update rand to 0.8 and bump MSRV
Absorb the `multipart` repository into `rouille`.
This was done using `git-filter-repo` to ensure hashes mentioned in
commit messages were correctly rewritten. Approximately:
# `git filter-repo` requires a clean clone
git clone https://github.com/abonander/multipart.git
cd multipart
# Move all code to a `multipart` subdirectory for all history
git filter-repo --to-subdirectory-filter multipart
# The default merge messages are "merge pull request #nnn from
# user/branch". GH links these incorrectly in the new repo, so
# rewrite messages and issue links from `#nnn` to
# `abonander/multipart#nnn`.
echo 'regex:(^|\s)(#\d+\s)==>\1abonander/multipart\2' > messages.txt
git filter-repo --replace-message messages.txt
# Re-add a remote and push as a new branch
git remote add me https://github.com/tgross35/rouille.git
git switch -c multipart-merge-prep
git push --set-upstream me multipart-merge-prep
# Now in the rouille repository
get fetch origin multipart-merge-prep
# Do the merge that creates this commit
git merge origin/multipart-merge-prep --allow-unrelated-histories
This should result in a correct blame and log for `multipart` files.
Original HEAD ref: f4fee608af ("Merge pull request tomaka#134 ...")
Filtered HEAD ref: e0c7c0a ("Merge pull request abonander/multipart#134 ...")
Apply Ondřej's patch from [1] to resolve future compatibility warnings in multipart, then update it further to resolve FCWs in all default features (the patch only resolved issues with the features that Rouille uses). Co-authored-by: Ondřej Hruška <ondra@ondrovo.com> [1]: tomaka#271
`buffer-redux` [1] is a maintained fork of `buf-redux` [2]. Switch to it in `multipart`. [1]: https://docs.rs/buffer-redux/latest/buffer_redux/ [2]: https://docs.rs/buf_redux/latest/buf_redux/
|
I'm not sure why, @tgross35, but this PR appears to have the entire tree since the beginning of time in it? The actual change looks like a great solution though so if you can find out what's gone on in Github or Git that would be great. It might be that you need to do a shallow clone from the upstream rather than pulling the whole 510 commits in, if that's possible. |
|
That’s entirely intentional - it’s a rewrite of multipart’s history to a subdirectory then a merge here, so the log and blame and everything for multipart files still shows up correctly in this repo. But if you would prefer, I can change this to a single-commit move :) |
In preparation for republishing this crate as a version that suit Rouille's needs, rename it.
|
Closed in favour of #296 |
As a resolution to #271, vendor the
multipartcrate https://github.com/abonander/multipart.This is merged with the same method I used to get
ctestintolibc, usinggit filter-repoto rewrite history to a subdirectory and rewrite issue mentions in commit messages to point to the upstream repo. More details and steps to reproduce are in the merge commit 672b1f1.After the merge, the FCWs are fixed by switching
multipartfrombuf-reduxtobuffer-redux(the maintained fork) and applying @MightyPork's patch from #271, plus a few updates so it builds with default featuresFinally, the merged crate is renamed to
rouille-multipartso it can be published as a new crate. I think it would be good to strip out all features thatrouilledoes not need before publishing, but that is easiest done as a follow up.