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

Explicitly specify the associated type of the trait & Minimum version. #228

Closed
wants to merge 4 commits into from
Closed

Conversation

sunhuachuang
Copy link
Contributor

Description

Checked on stable versions.

If explicitly specify the associated type of the trait CurveCycle & PairingFriendlyCycle.
<=1.45 is not ok, because const fn.
1.46 ~ 1.50 is ok. cargo test is ok.

If not.
1.49 + is ok.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@weikengchen
Copy link
Member

I need to verify...but one of the reasons why we change the representation of CurveCycle and so on is to reduce the needs for the downstream to include those checks (but I could be wrong, it might be unnecessary).

One quick question: the arkworks-rs has traditionally been rush to use newer versions of Rust (since some language features we have been waiting for being stable can simplify the code a lot). In your use case, is there a situation where you would need to use a previous version?

@sunhuachuang
Copy link
Contributor Author

I also agree to use the latest version to provide performance and optimized code. And the library is evolving rapidly.

But unfortunately, our production environment is still using version 1.48, looking for stability, not the latest, so the default compile environment in docker cannot upgrade.

Maybe another way is to put some tags on the library to mark version upgrade and incompatibility. Otherwise, the only way is to lock commit, but it's not elegant.

@Pratyush
Copy link
Member

Pratyush commented Mar 10, 2021

Is it not possible to install the latest rust version in your docker environment via a new docker layer? Or even just installing rustup from source?

For example, this? https://hub.docker.com/_/rust

@sunhuachuang
Copy link
Contributor Author

Thinks, I am going to persuade everyone to upgrade to the latest version. And then it will be easily solved.

And if no others need this PR, I will close it.

@weikengchen
Copy link
Member

Keep us posted. I think this PR is still helpful---we can say what is the minimal version needed to compile.

@ValarDragon
Copy link
Member

FWIW, you can now pin to v0.2.0, which will at least work for 1.49+. If you have thoughts on how up-to-date of a rust version is ok for you're environment, please leave them in #255 as well!

@ValarDragon
Copy link
Member

I think this PR is good to merge

@weikengchen
Copy link
Member

Just to collect a last round of feedback: @sunhuachuang do you still need this PR so that algebra works for 1.46? @ValarDragon what do you think about this, since future versions of arkworks-rs may bring the version dependency even higher?

Based on the discussion above, what is most needed in this PR is that we specify the minimal version to use.

@sunhuachuang
Copy link
Contributor Author

I'm OK, I have upgraded the company environment to the latest 1.51+.

Rust is developing very fast. Although some projects continue to use lower versions, if no one else encounters this problem, we can continue to upgrade with Rust, as long as it is compatible with the 6-month (2 versions).

@ValarDragon
Copy link
Member

Oh cool, if this change isn't needed anymore, then I think we should close this. @huitseeker added an MSRV check in the https://github.com/arkworks-rs/algebra/tree/compiler_1.51 branch, so I think we should close this for now then

@weikengchen
Copy link
Member

Got it. Then let me close this PR for now.

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

Successfully merging this pull request may close these issues.

None yet

4 participants