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
Replace Rakefile with Makefile #537
Conversation
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.
This looks good to me. How will people choose current vs next in the SDK? We wouldn't want to release the next XDR, as it is very unstable. Or rather, we'd only want to release next on non-regular release numbers, like maybe a pre-release, or something else.
Yeah, my plan for now for dev was to do a separate branch and switch it in there. "Proper" switching between the xdrs is tbd (any suggestions?), but figured backporting this would minimize the diff later. |
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.
Incidentally, this updated the curr xdr to latest core master. But could leave that out of this PR if desired.
If doing this is not inconvenient, could we leave that out of this PR so that this change is isolated to a refactor only, then follow up with another PR where we generate it?
Otherwise 👍🏻.
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.
was out sick so late to the party but figured I'd add my thoughts anyway
Stellar-overlay.x \ | ||
Stellar-transaction.x \ | ||
Stellar-types.x | ||
XDR_FILES_LOCAL_CURR=$(addprefix xdr/curr/,$(XDR_FILES_CURR)) |
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.
This whole curr
and next
thing broke the entire ecosystem, I bet. Why couldn't they keep xdr/
and add xdr-next/
??
cd .. && rm -rf dts-xdr | ||
yarn run prettier --write types/xdr.d.ts | ||
``` | ||
1. Make sure you have [Docker](https://www.docker.com/) installed and running. |
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.
Better link: https://docs.docker.com/engine/install/
@@ -7,7 +7,6 @@ | |||
"scripts": { | |||
"test": "gulp test:node", | |||
"test:watch": "gulp test:watch", | |||
"xdr": "bundle exec xdrgen -o src/generated -l javascript -n stellar-xdr xdr/Stellar-ledger-entries.x xdr/Stellar-ledger.x xdr/Stellar-overlay.x xdr/Stellar-SCP.x xdr/Stellar-transaction.x xdr/Stellar-types.x", |
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.
Why not add the make reset-xdr
command here?
This does a few things:
Replace Rakefile with Makefile (to match https://github.com/stellar/rs-stellar-xdr).
Remove all ruby. Not needed anymore. xdrgen is dockerized
Automate and dockerize the dts-xdr build step.
Split
xdr
directory intoxdr/curr
andxdr/next
. Which one it uses is hard-coded insrc/xdr.js
andtypes/xdr.d.ts
for now.Cleaned up the readme for all of the above.
Incidentally, this updated the curr xdr to latest core master. But could leave that out of this PR if desired.
The main potential issue with this are our hand-edit hacks in the .d.ts files. So like.. make can re-generate those files, but... They'll be broken until you copy-pasta over the changes again. oof.