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

Remove deprecated account constraints #901

Open
1 of 2 tasks
fanatid opened this issue Oct 20, 2021 · 14 comments · May be fixed by project-serum/stake#21
Open
1 of 2 tasks

Remove deprecated account constraints #901

fanatid opened this issue Oct 20, 2021 · 14 comments · May be fixed by project-serum/stake#21
Labels
good first issue Good for newcomers help wanted Extra attention is needed lang

Comments

@fanatid
Copy link
Contributor

fanatid commented Oct 20, 2021

belongs_to and raw literal are deprecated from v0.11, should we rid them from the code?

@armaniferrante
Copy link
Member

Sounds good to me.

@armaniferrante armaniferrante added good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed lang labels Oct 20, 2021
@Onyinye91-ctrl
Copy link
Contributor

@fanatid I am interested in this issue. Please how do i solve it?

@fanatid
Copy link
Contributor Author

fanatid commented Oct 20, 2021

Basically, you need to remove constraints from https://github.com/project-serum/anchor/blob/master/lang/syn/src/parser/accounts/constraints.rs and https://github.com/project-serum/anchor/blob/master/lang/syn/src/codegen/accounts/constraints.rs
But there should be other places and maybe dependencies. Better remove constraints in two separate pull requests. belongs_to should be easier.

@Onyinye91-ctrl
Copy link
Contributor

@fanatid Thanks for the assistance. will work on it soon. Just an observation, the second link you share doesn't not have belong_to. I searched but can't find it

@fanatid
Copy link
Contributor Author

fanatid commented Oct 22, 2021

@Onyinye91-ctrl thank you for your contribution! Do you want to work on removing raw literal constraints too?

@Onyinye91-ctrl
Copy link
Contributor

@fanatid Sure i am interested

@Nikhil3389
Copy link

I want to contribute to this project. Can you assign this to me?

@fanatid
Copy link
Contributor Author

fanatid commented Oct 23, 2021

@Nikhil3389 I'm afraid that @Onyinye91-ctrl already started work on this.

@Onyinye91-ctrl
Copy link
Contributor

@fanatid what more can i do?

@Onyinye91-ctrl
Copy link
Contributor

@fanatid Noted

@NBNARADHYA
Copy link
Contributor

@fanatid Hey! I would love to work on this issue :)

I am actually a current MLH Solana fellow. Since I am new to Solana, I have been learning from different tutorials.

I have a couple of questions / clarifications if you don't mind:

  1. Raw constraints meaning literal string constraints right ? (Or in short something like this: #[account("something")] ?)
  2. I modify the code to return an error over here and remove all constraint literal related stuff (and alter the tests as well) right ?

@fanatid
Copy link
Contributor Author

fanatid commented Feb 10, 2022

Hi @NBNARADHYA!

  1. Yes
  2. Yes, you can remove this code and fix all errors

@NBNARADHYA
Copy link
Contributor

Great! @fanatid I'm on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed lang
Projects
None yet
5 participants