-
Notifications
You must be signed in to change notification settings - Fork 758
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
Turning the ethereumjs-vm into a monorepo #666
Conversation
Org links and git hooks
Org links and git hooks
…ooks Org links and git hooks
TypeScript migration
…transactions Fix signing eip155 transactions
chore(package): update husky to version 2.1.0
…ooks Org links and git hooks
…12.0 Update util to the latest version 🚀
Add node 11 to travis.yml
GitHub might have had a hard time detecting the new test files, but they are all passing: https://github.com/evertonfraga/ethereumjs-vm/actions?query=branch%3Amaster |
Ok, did some practical walkthrough on various things. some questions, eventually improvements, but at least on this round no blockers along the way. 😄 I would generally suggest that we try to avoid to regenerate this PR on improvement suggestions if things are not grave to gain further confidence in the respective PR submitted and rather do subsequent changes on follow-up PRs. I would also suggest to do the merge rather quickly (but also: with no rush) - eventually already tomorrow - to get back to some consistent new state. This update is so huge that I think it is better to not allow a too long period for unexpected events to occur somewhat drifting away from a stable state. Nevertheless there should be 2-3 more voices here before a merge. EthereumJS VM Monorepo Transition - Practical Experience ReportExperience Report
Remarks/questions/reassurances along the wayR1: package.json files (e.g. for the account package) still contain the old package name and URL formats, this is intended I suppose? R2: Stumbled upon this scripts folder with a generic script execution structure (nice!) and actually executing on one script modifying the StateManager.ts file, script is triggered by the R3: Various URLs in the main README.md still contain fork references (to Evertons fork), this is likely also a post-monorepo-PR-merge new PR change? Some follow-up itemsI1: For pre-monorepo-fork submitted PRs on the VM I would have a tendency towards a policy that rebases are not allowed and PRs have to be resubmitted to be accepted. Does this make sense? |
Will do a commit review by commenting on the numbered list items below since many changes are not applicable for direct comments.
✅ 6 commits for each library moved, did some simple checks on completeness, looks good
✅ 5 commits for each of the external libraries Comparing the "Changes from x commits number on each merge commit summary page (see screenshot below, e.g. account merge commit) with the number of commits on the library itself.
=> consistent pattern (2 more on the commit side) except for 🚫 @evertonfraga Do you have an idea where those missing commits are respectively is there some reasoning for the differences in the numbers?
✅ Kind of a stub, can be added/updated later
✅ This is referring to this lerna directive, associated commit here, simple change, added to all six packages
✅ Ok, transfers look good, also indicated to work by the triggered GitHub action runs on the test forks
✅ Ok, done for all six packages
🚫 I think there is the package name missing in the second part of the URL comparison, see e.g.: @ethereumjs/account@2.0.1...@ethereumjs/2.0.2
Summary: Thanks Everton, this is really outstanding work, totally admire all the discipline you put up in preparing and documenting all this stuff! 👍 🙏 😄 |
Thanks for the thorough review, as always @holgerd77. I will respond to each topic acknowledging/reasoning/fixing as I go. |
OK I will take a look. the combination really does not look correct. (script)
Correct. Releases are external to the source code (and can't have PRs for validation), they will be handled separately. I believe it would be an unnecessary risk to migrate to scoped packages in the same PR. I wanted to keep this PR straightforward, with as few changes to the source code as possible, to keep reviewability at a good level. Please take a look at the post-migration steps on the monorepo board.
Correct, I will handle those along with the scoped package publishing.
Mind that testing with linked packages is not yet deployed to this PR, and the
I kept my own fork URLs just so you can refer back to the fork page and see all the badges working (especially codecov and github actions). Now that you validated them, I will send a commit pointing to ethereumjs-vm :)
That makes sense. There are only a few of them and it's pretty easy to reapply commits. |
GitHub poses a hard cap of 250 commits they display on the website in PR comparisons: But doing the math, we can achieve the exact number this PR aims to merge (1,321 commits)
Right! That slipped my mind. Will take a look.
Great catch! I'll tweak the RegExp and run only this part of the script again. Will send a commit soon.
Sent the permanent commit already (9633415).
Thanks for the kind words, @holgerd77! My pleasure. |
@evertonfraga ah, this all sounds more manageable than I had hoped for, maybe we can even still merge tomorrow during the day, we'll see. Let me/us explicitly know when you think this is ready to be merged. |
Remaining tasks for this PR:
|
* upgrade typedoc and use `library` mode * generate docs * run lint:fix * remove vm state/promisified from docs * common: remove tests/* and other unnecessary files from typedoc * blockchain: remove unnecessary files from docs * run lint:fix
This PR is ready for review. |
Thanks @ryanio and @evertonfraga!
This looks good, seems that some badges will only be generated after the first corresponding CI run, so not displaying yet. Anyhow, even if there would be some broken badge links this wouldn't be a blocker though.
Looks good now.
Ok, commit looks good.
Ok, nice. 😄 Great. I will give this another 3+ hours waiting period for some last minute chance to raise a voice here and otherwise merge. Intended Merge Time between 2-3pm CET (Thursday) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Monorepo. 😄 |
Yay! |
This PR introduces the Monorepo, bringing the libraries
ethereumjs-account
,ethereumjs-block
,ethereumjs-blockchain
,ethereumjs-common
andethereumjs-tx
to this repository.How to review this PR
I advise looking directly to my fork's commits for a better understanding of the changes, as the comparison view in this PR is huge.
Every commit was generated by this script I made, so I could work on changes and improve the migration for several iterations. I made my best efforts to keep the git history clean, despite the huge changes around.
A brief explanation of the commits involved in this PR:
1.
monorepo: moving common
Moving each library source code down to
./packages
2.
Merge remote-tracking branch 'account/master' into monorepo
These commits merges the whole history of each package to this repo, maintaining the commit hashes, authors and dates. Mind this issue, though #657.
3.
Implementing Lerna
Adds Lerna config and package.json files
4.
Lerna config: publishConfig.directory
This is needed for integrated module testing/development with TypeScript, linked by Lerna. Instead of using files from
dist/
, it will look for files insrc/
.5.
monorepo: Moving .github files to root; deleting other CI files
.github
workflow files to the root's.github/
contributing.md
6.
monorepo: Adding test cascade directives
Injects
paths-ignore
directives to github actions so that it will run only tests from affected packages in that particular change, instead of always running all tests. More info: #561 (comment)7.
monorepo: Fixing execution paths for github actions
Injects
cwd
directives to run each packages' tests in their own directory.8.
Generating docs with updated urls
Regenerating all documentation, minding the updated monorepo URLs.
9.
Updating tag comparison links in CHANGELOG
Updates all links in CHANGELOG to account for the new tag format (eg:
@ethereumjs/account@1.0.3
)10.
Adding peripheral files
Adding important files to the new monorepo structure:
Closes #561.