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

Handling missing branch for Email identity in match patterns #3064

Merged
merged 4 commits into from
Sep 13, 2024

Conversation

silva-fj
Copy link
Contributor

No description provided.

@silva-fj
Copy link
Contributor Author

FYI this release branch was already broken, some changes related to Assertions:

https://github.com/litentry/litentry-parachain/actions/runs/10826722348/job/30038362291

I don't know what is missing, I have not checked the commit history

@Kailai-Wang
Copy link
Collaborator

I think the error reported it clearly:

#12 381.1 error[E0004]: non-exhaustive patterns: `&Assertion::LinkedIdentities` not covered
#12 381.1    --> /home/ubuntu/tee-worker/litentry/core/credentials/src/credential_schema.rs:27:8
#12 381.1     |
#12 381.1 27  |     match assertion {
#12 381.1     |           ^^^^^^^^^ pattern `&Assertion::LinkedIdentities` not covered
#12 381.1     |
#12 381.1 note: `Assertion` defined here
#12 381.1    --> /home/ubuntu/primitives/core/src/assertion/mod.rs:146:2
#12 381.1     |
#12 381.1 65  | pub enum Assertion {
#12 381.1     | ------------------
#12 381.1 ...
#12 381.1 146 |     LinkedIdentities,
#12 381.1     |     ^^^^^^^^^^^^^^^^ not covered
#12 381.1     = note: the matched value is of type `&Assertion`
#12 381.1 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown

@silva-fj
Copy link
Contributor Author

I think the error reported it clearly:

#12 381.1 error[E0004]: non-exhaustive patterns: `&Assertion::LinkedIdentities` not covered
#12 381.1    --> /home/ubuntu/tee-worker/litentry/core/credentials/src/credential_schema.rs:27:8
#12 381.1     |
#12 381.1 27  |     match assertion {
#12 381.1     |           ^^^^^^^^^ pattern `&Assertion::LinkedIdentities` not covered
#12 381.1     |
#12 381.1 note: `Assertion` defined here
#12 381.1    --> /home/ubuntu/primitives/core/src/assertion/mod.rs:146:2
#12 381.1     |
#12 381.1 65  | pub enum Assertion {
#12 381.1     | ------------------
#12 381.1 ...
#12 381.1 146 |     LinkedIdentities,
#12 381.1     |     ^^^^^^^^^^^^^^^^ not covered
#12 381.1     = note: the matched value is of type `&Assertion`
#12 381.1 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown

Yep, what I meant is that I don't know the full context of these changes. In dev branch this variant is also not covered so I assume this is some work in progress (I don't know what the value for that schema should be)

@Kailai-Wang
Copy link
Collaborator

I think @higherordertech updated the release branch due to the same reason that you have - he wanted to update the primitives to include another entry (but probably only the enum itself, not the places where it's referenced, hence the error)

@BillyWooo
Copy link
Collaborator

BillyWooo commented Sep 12, 2024

The error is clear. But strange, why this #3042 passed.

@higherordertech
Copy link
Contributor

higherordertech commented Sep 13, 2024

I think @higherordertech updated the release branch due to the same reason that you have - he wanted to update the primitives to include another entry (but probably only the enum itself, not the places where it's referenced, hence the error)

Fixed now
image

@silva-fj silva-fj requested a review from a team September 13, 2024 07:10
@silva-fj silva-fj merged commit cdbe9b0 into release-v0.9.19 Sep 13, 2024
35 checks passed
@silva-fj silva-fj deleted the fix-release-v0.9.19 branch September 13, 2024 08:45
jonalvarezz added a commit that referenced this pull request Sep 23, 2024
Signed-off-by: Jonathan Alvarez <jonathan@litentry.com>
jonalvarezz added a commit that referenced this pull request Sep 23, 2024
* feat: P-1006 add new Assertion enum item LinkedIdentities (#3042) (#3051)

Co-authored-by: higherordertech <higherordertech>

* adding email identity to core primitives (#3063)

* adding email identity to core primitives

* fixing formatting issue

* Handling missing enum branches in match patterns (#3064)

Handling missing variants for LinkedIdentities and Identity in match patterns

* re-apply changes from #3064 after restructure

Signed-off-by: Jonathan Alvarez <jonathan@litentry.com>

---------

Signed-off-by: Jonathan Alvarez <jonathan@litentry.com>
Co-authored-by: will.li <120463031+higherordertech@users.noreply.github.com>
Co-authored-by: Francisco Silva <franjs.francisco@gmail.com>
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.

4 participants