Update to a more recent rocket and rust toolchain #205

Merged
lthms merged 1 commits from recent_rocket into master 6 years ago
lthms commented 6 years ago (Migrated from github.com)

So, I have made some progress tonight, but unfortunately, this has become way more complicated than initially expected. The main reason is pretty simple: rocket has introduced some serious breaking changes related to the Uri type, and I am not familiar enough unfortunately to fix them easily.

I push this so you folks can have a look, maybe with enough familiarity this is trivial to fix.

Beware that this PR uses my forks of rocket_{i18n,csrf}. They are basically working, AFAICT at least, but I wanted to have a working Plume before creating PR there.

So, yeah. TL;DR: I tried and failed, but maybe what I achieved will help you?

To do before merging:

  • Fix the warnings
  • PR to rocket_i18n
  • PR to rocket_csrf
So, I have made some progress tonight, but unfortunately, this has become way more complicated than initially expected. The main reason is pretty simple: rocket has introduced some serious breaking changes related to the `Uri` type, and I am not familiar enough unfortunately to fix them easily. I push this so you folks can have a look, maybe with enough familiarity this is trivial to fix. Beware that this PR uses my forks of `rocket_{i18n,csrf}`. They are basically working, AFAICT at least, but I wanted to have a working Plume before creating PR there. So, yeah. TL;DR: I tried and failed, but maybe what I achieved will help you? To do before merging: - [x] Fix the warnings - [x] PR to `rocket_i18n` - [x] PR to `rocket_csrf`
lthms (Migrated from github.com) reviewed 6 years ago
lthms (Migrated from github.com) commented 6 years ago

So yeah, I just want to emphasize once again, just to be clear, that this is meant to be temporary, until my changes (or equivalent changes) are pushed to the rightful upstream.

So yeah, I just want to emphasize once again, just to be clear, that this is meant to be temporary, until my changes (or equivalent changes) are pushed to the rightful upstream.
lthms commented 6 years ago (Migrated from github.com)

Related commits:

Related commits: - `rocket_i18n` :: https://github.com/lthms/rocket_i18n/commit/b9bd6b9674b09590a7f43c8408781e8030397743 - `rocket_csrf` :: https://github.com/lthms/rocket_csrf/commit/9828be7546f1b7f975e3b71ebe1be664b3ae1014 (cc @fdb-hiroshima)
elegaanz commented 6 years ago (Migrated from github.com)

Thanks a lot for your help! Looks like a lot of errors are happening because of 56c6a96f6a, so adding .into() after uri! invocations should fix it.

Thanks a lot for your help! Looks like a lot of errors are happening because of https://github.com/SergioBenitez/Rocket/commit/56c6a96f6a94ab844a0f571c303d741c7ec668d3, so adding `.into()` after `uri!` invocations should fix it.
lthms commented 6 years ago (Migrated from github.com)

I will try to do that, if that’s okay with you.

I will try to do that, if that’s okay with you.
elegaanz commented 6 years ago (Migrated from github.com)

Yes, of course! If you have any question about the code, you know you can ask me 😉

Yes, of course! If you have any question about the code, you know you can ask me :wink:
lthms commented 6 years ago (Migrated from github.com)

I’ve pushed a new commit that fixes the remaining errors. There remains a lot of warnings, though.

I’ve pushed a new commit that fixes the remaining errors. There remains a lot of warnings, though.
lthms commented 6 years ago (Migrated from github.com)

Some warnings are due to a change in rustc that affects diesel. The crate has already been updated, but not released.

Some warnings are due to a change in `rustc` that affects `diesel`. The crate has already been updated, but not released.
elegaanz commented 6 years ago (Migrated from github.com)

@lthms Could you please use the git repository directly in the Cargo.toml then, with a pinned rev? We will go back to a stable version once it will be released.

@lthms Could you please use the git repository directly in the Cargo.toml then, with a pinned `rev`? We will go back to a stable version once it will be released.
lthms commented 6 years ago (Migrated from github.com)

I think the PR of interest is https://github.com/diesel-rs/diesel/pull/1787

So we need to depend on at least this revision. Unfortunately, I don't know if there are pending issues in current diesel master branch, so I have to admit I am not sure which revision to choose…

I think the PR of interest is https://github.com/diesel-rs/diesel/pull/1787 So we need to depend on at least this revision. Unfortunately, I don't know if there are pending issues in current `diesel` `master` branch, so I have to admit I am not sure which revision to choose…
elegaanz commented 6 years ago (Migrated from github.com)

Another solution could be to ignore these warnings for the moment… https://github.com/rust-lang/crates.io/pull/1469/files

Another solution could be to ignore these warnings for the moment… https://github.com/rust-lang/crates.io/pull/1469/files
lthms commented 6 years ago (Migrated from github.com)

Once https://github.com/fdb-hiroshima/rocket_csrf/pull/1 is merged, I will update Cargo.toml to use the upstream rocket_csrf, squash my commits and I think it will be okay, at least from my side.

Once https://github.com/fdb-hiroshima/rocket_csrf/pull/1 is merged, I will update `Cargo.toml` to use the upstream `rocket_csrf`, squash my commits and I think it will be okay, at least from my side.
lthms commented 6 years ago (Migrated from github.com)

From my perspective, this PR is now ready. I don’t think I have broken something, but I guess you never know :D.

From my perspective, this PR is now ready. I don’t think I have broken something, but I guess you never know :D.
trinity-1686a approved these changes 6 years ago

Reviewers

trinity-1686a approved these changes 6 years ago
The pull request has been merged as fe7f87c47f.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b recent_rocket master
git pull origin recent_rocket

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff recent_rocket
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#205
Loading…
There is no content yet.