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

Install dependencies with Node.js instead of git modules #734

Merged
merged 13 commits into from
Dec 15, 2023

Conversation

andreivladbrg
Copy link
Member

Addresses #508 and updates prb-math to 4.0.2.

Since this project is not going to have a lib directory anymore, it no longer makes sense to keep the re-exported types. This is because if the project is installed with forge install sablier-labs/v2-core it won't have recursive modules to install, and node modules can't be installed. And if the project is installed with yarn add @sablier/v2-core, it would automatically install those deps (prb-math and openzeppelin).

@andreivladbrg

This comment was marked as resolved.

@PaulRBerg

This comment was marked as resolved.

@andreivladbrg
Copy link
Member Author

I've made sure to mention that the recommended method to install v2-core project is via Node.js:

image

However, I realized that for integrators who still use forge install, they would also need to manually install prb-math and openzeppelin. This is because there are no longer recursive modules. Should we mention this in the README file? @PaulRBerg

build: remove .gitmodules
build: remove lib dir
build: include test/utils in files published
docs: specify recommended installation method on README
chore: update remappings accordingly
ci: install deps with pnpm install and remove "recursive"
Copy link
Member

@PaulRBerg PaulRBerg left a comment

Choose a reason for hiding this comment

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

feedback below

.github/workflows/ci-deep.yml Show resolved Hide resolved
.github/workflows/ci-deep.yml Outdated Show resolved Hide resolved
.github/workflows/ci-deep.yml Outdated Show resolved Hide resolved
.github/workflows/ci-deep.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
remappings.txt Show resolved Hide resolved
@PaulRBerg
Copy link
Member

PaulRBerg commented Dec 14, 2023

it no longer makes sense to keep the re-exported types.

Those types have always been problematic, actually. See this.

So it's good that we are getting rid of them.

they would also need to manually install prb-math and openzeppelin. This is because there are no longer recursive modules. Should we mention this in the README file?

Yes, we should. Also, please test that it works properly!

@andreivladbrg
Copy link
Member Author

andreivladbrg commented Dec 14, 2023

Those types have always been problematic, actually. See simplemachine92/JBSips#10.
So it's good that we are getting rid of them.

Great

Yes, we should. Also, please test that it works properly!

I did. You can test it yourself using this branch from periphery. Everything works there.

ci: restore the node modules in coverage job
Comment on lines +331 to +332
- name: "Install the Node.js dependencies"
run: "pnpm install"
Copy link
Member

Choose a reason for hiding this comment

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

This step is now redundant given that we are caching node_modules.

Copy link
Member Author

Choose a reason for hiding this comment

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

the slither-analyze job is going to be removed from ci.yml and we will need the pnpm installin its own file, see #726

Copy link
Member

Choose a reason for hiding this comment

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

Fine. In this case, it doesn't really matter what we do here - can you keep my latest commit as is, please?

@PaulRBerg
Copy link
Member

I did. You can test it yourself using this branch from periphery. Everything works there.

Fantastic

chore: fix formatting in CI files
chore: improve wording in CI files
ci: remove redundant "pnpm install" steps
@PaulRBerg PaulRBerg force-pushed the build/modules-to-npm branch from be86351 to a110f20 Compare December 15, 2023 11:53
@PaulRBerg PaulRBerg merged commit 0cd146a into staging Dec 15, 2023
8 of 9 checks passed
@PaulRBerg PaulRBerg deleted the build/modules-to-npm branch December 15, 2023 12:34
andreivladbrg added a commit that referenced this pull request Dec 15, 2023
* build: install deps only with Node.js

build: remove .gitmodules
build: remove lib dir
build: include test/utils in files published
docs: specify recommended installation method on README
chore: update remappings accordingly
ci: install deps with pnpm install and remove "recursive"

* feat: remove re-exported types

* style: add line

* ci: install pnpm and Node.js on each job

* chore: update Slither config

* test: update Precompiles bytecode

* build: include remappings.txt file in the package

* ci: cache the node modules and re use them

* docs: improve README

* build: remove unnecessary remmapings file from package

* ci: rename cached key

ci: restore the node modules in coverage job

* ci: consistent caching keys

chore: fix formatting in CI files
chore: improve wording in CI files
ci: remove redundant "pnpm install" steps

* build: set peer dep version to "4.0.x"

---------

Co-authored-by: Paul Razvan Berg <paul.razvan.berg@gmail.com>
andreivladbrg added a commit that referenced this pull request Dec 15, 2023
docs: update date in changelog
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.

2 participants