Skip to content

Remove depricated: literal constraints - #1441

Closed
NBNARADHYA wants to merge 3 commits into
otter-sec:masterfrom
MLH-Fellowship:remove-depricated
Closed

Remove depricated: literal constraints#1441
NBNARADHYA wants to merge 3 commits into
otter-sec:masterfrom
MLH-Fellowship:remove-depricated

Conversation

@NBNARADHYA

@NBNARADHYA NBNARADHYA commented Feb 11, 2022

Copy link
Copy Markdown
Contributor

Changes:

  1. Removes literal constraints support which was depricated.
  2. Fixes Remove deprecated account constraints #901

Signed-off-by: Nikhil B N <nikhilbn365@gmail.com>
@NBNARADHYA

Copy link
Copy Markdown
Contributor Author

@fanatid I have created a draft for this pr which fixes #901. Would you please approve workflow run for this ? So that I will be able to modify tests and add new ones if it fails. Thanks :)

…depricated

Signed-off-by: Nikhil B N <nikhilbn365@gmail.com>
@NBNARADHYA

NBNARADHYA commented Feb 14, 2022

Copy link
Copy Markdown
Contributor Author

@fanatid could you please approve workflow run ? I have fixed all warnings and build errors, now I have to make sure to get rid of literal constraints which are being used in certain tests in these files: 1, 2.

Literal constraint is also used over here -> as #[account("internal")]. Could you please help me fix this @fanatid ? What is the alternative around this if it is deprecated?

Thanks

@fanatid
fanatid marked this pull request as ready for review February 14, 2022 18:18
@fanatid
fanatid marked this pull request as draft February 14, 2022 18:18
@NBNARADHYA

Copy link
Copy Markdown
Contributor Author

@fanatid please approve workflow run!

@fanatid

fanatid commented Feb 14, 2022

Copy link
Copy Markdown
Contributor

@NBNARADHYA please research how to run actions on your fork. You can start from editing these lines: https://github.com/project-serum/anchor/blob/master/.github/workflows/tests.yaml#L3-L9

@NBNARADHYA

Copy link
Copy Markdown
Contributor Author

Oh. My bad! I thought github would atleast display actions in forked repo and I could run it manually but I wasn't able to. So, I assumed it was disabled on forked repo! Thanks @fanatid

Signed-off-by: Nikhil B N <nikhilbn365@gmail.com>
@NBNARADHYA

Copy link
Copy Markdown
Contributor Author

@fanatid I fixed the issues, and all tests are passing except CFO. Because it has a submodule which uses literal constraints.

I am not sure on how to tackle this ? Should I first get changes merged over there so that the tests pass over here ?

@armaniferrante

Copy link
Copy Markdown
Contributor

I am not sure on how to tackle this ? Should I first get changes merged over there so that the tests pass over here ?

Yes, please open a pr on the submodule.

@NBNARADHYA

NBNARADHYA commented Feb 15, 2022

Copy link
Copy Markdown
Contributor Author

@armaniferrante @fanatid I have made a pr to the stake repo: project-serum/stake#21

@NBNARADHYA

NBNARADHYA commented Feb 15, 2022

Copy link
Copy Markdown
Contributor Author

The submodules which were linked to this repository were:
https://github.com/project-serum/serum-dex,
https://github.com/project-serum/swap.git,
https://github.com/project-serum/stake.git,
https://github.com/armaniferrante/auction-house

All of these except stake are "literal constraint" free. So, I have made the changes to only stake repo @fanatid @armaniferrante

@armaniferrante

Copy link
Copy Markdown
Contributor

Closing as stale.

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.

Remove deprecated account constraints

3 participants