Skip to content
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 using try_trait in persistent_store #322

Merged
merged 4 commits into from
Jun 9, 2021
Merged

Stop using try_trait in persistent_store #322

merged 4 commits into from
Jun 9, 2021

Conversation

ia0
Copy link
Member

@ia0 ia0 commented Jun 9, 2021

Fixes #320.

ia0 added 2 commits June 9, 2021 13:42
But still make sure it passes tests with the most recent nightly.
It is too much instable.
@google-cla google-cla bot added the cla: yes label Jun 9, 2021
with:
submodules: true

- uses: actions-rs/toolchain@v1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't seeing it but now we have twice the toolchain setup.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that we install:

  • the frozen compiler with the prod target
  • the most recent nightly (to detect breakage early)

And we can only do this with 2 toolchain "actions".


- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default (i.e. when override is not set to true) the action will respect the rust-toolchain file. Therefore it shouldn't be necessary to specify we want nightly.
But this requires the git submodules to be checked-out (which you added on this PR)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to check that the code compiles with both versions which is why I keep nightly.


- name: Unit testing of Persistent store library (release mode)
uses: actions-rs/cargo@v1
with:
toolchain: nightly
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary? The rust-toolchain file points to a specific nightly already. Do you need to override with a more recent one? Because this would have the effect that we unit-test the library with a different toolchain than the one we build against.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see 3 options:

  • test only with frozen compiler
  • test only with nightly
  • test with both

I think they should be all equivalent (as long as the code compiles on both versions). First I wanted to do a matrix but it's not as simple because we can't name the rust-toolchain toolchain (in a maintainable way). But I can try again if we prefer to do everything (build + test) on both versions.

Prod is already built by opensk test.
@ia0
Copy link
Member Author

ia0 commented Jun 9, 2021

Actually I just remembered why I was only using nightly, it's because opensk build already checks that the library builds. So it's enough to just run the tests.

@jmichelp
Copy link
Collaborator

jmichelp commented Jun 9, 2021

Don't forget to also issue a PR to the bugfix branch :)

@ia0 ia0 merged commit d9e32ac into google:develop Jun 9, 2021
@ia0 ia0 deleted the fix_320 branch June 9, 2021 13:39
@ia0
Copy link
Member Author

ia0 commented Jun 9, 2021

Actually, neither the bugfix nor the stable branch have this issue. It was introduced by #238 which was only on the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants