Skip to content

Add description to methods in build.js#44

Closed
DockBoss wants to merge 13 commits into
ethereum:mainfrom
DockBoss:main
Closed

Add description to methods in build.js#44
DockBoss wants to merge 13 commits into
ethereum:mainfrom
DockBoss:main

Conversation

@DockBoss

Copy link
Copy Markdown
Contributor

No description provided.

@DockBoss

Copy link
Copy Markdown
Contributor Author
  • Geth
  • OpenEthereum
  • Nethermind
  • Besu
  • Erigon

@DockBoss

Copy link
Copy Markdown
Contributor Author

@timbeiko @MicahZoltu @vorot93 @lightclient @MariusVanDerWijden @draganrakita @gnidan @rekmarks

Sooo would you all like me to mention you on each PR?

@timbeiko

Copy link
Copy Markdown
Contributor

You can exclude me 👍

@rekmarks

Copy link
Copy Markdown

Same, I'm not involved in day-to-day maintenance, although this does seem like a good PR!

@MicahZoltu

Copy link
Copy Markdown

@timbeiko @MicahZoltu @vorot93 @lightclient @MariusVanDerWijden @draganrakita @gnidan @rekmarks

Sooo would you all like me to mention you on each PR?

I don't think that is necessary. People interested can subscribe to this repository to get notifications for all PRs. Definitely mention me on things that may be particularly relevant to me though, as I don't know if I'll have the time to watch everything that flows through this repository.

Comment thread scripts/build.js Outdated
Comment on lines +33 to +43
descriptionFiles.forEach(file => {
let raw = fs.readFileSync(descriptionBase + file);
const methodName = file.split(".")[0]
let stringyDescription = raw.toString();
methods.forEach((method, i) => {
if (method.name === methodName) {

methods[i].description = stringyDescription;
}
})
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider a for ... of loop here rather than a collection.forEach. Also recommend using const instead of let as it provides stronger guarantees to the reader and the compiler about intent.

Suggested change
descriptionFiles.forEach(file => {
let raw = fs.readFileSync(descriptionBase + file);
const methodName = file.split(".")[0]
let stringyDescription = raw.toString();
methods.forEach((method, i) => {
if (method.name === methodName) {
methods[i].description = stringyDescription;
}
})
});
for (const file of descriptionFiles) {
const raw = fs.readFileSync(descriptionBase + file);
const methodName = file.split(".")[0]
const stringyDescription = raw.toString();
for (const method of methods) {
if (method.name === methodName) {
method.description = stringyDescription;
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Though, a .map may actually be more appropriate here.

Comment thread scripts/build.js Outdated
...methods,
...parsed,
];
...parsed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this change was a mistake? Most of this file is using tab for indentation, but some lines are using spaces. This should be fixed file/repository wide, but at least for this PR we probably shouldn't be making the situation worse. 😄

I recommend adding a .editorconfig to the root of the project so people's editors can automatically do the right thing with regards to indentation consistency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll add an .editorconfig. I feel relatively strongly that this should be a tab indented repo. There is very little alignment occurring and I think people should have the choice of how the view the specs. Of course, if there are good reasons against, I can be convinced otherwise....

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, walking this back slightly. I think I'm okay for spaces in the js files as it appears to be the standard. We'll keep the spec files tab indented.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Boo. Tabs are definitely superior here for the exact reason you mentioned.

@alita-moore

Copy link
Copy Markdown

@timbeiko @MicahZoltu @vorot93 @lightclient @MariusVanDerWijden @draganrakita @gnidan @rekmarks
Sooo would you all like me to mention you on each PR?

I don't think that is necessary. People interested can subscribe to this repository to get notifications for all PRs. Definitely mention me on things that may be particularly relevant to me though, as I don't know if I'll have the time to watch everything that flows through this repository.

@MicahZoltu ideally we want confirmation from all clients on each endpoint. And timing is important (we get paid by the hour), so if mentioning them would speed things up I'd champion for that. (I mentioned people before I saw this, btw)

@alita-moore

Copy link
Copy Markdown

also cc @MicahZoltu I addressed your comments

@MicahZoltu

Copy link
Copy Markdown

timing is important (we get paid by the hour)

I would assume that we aren't paying you to sit and wait for PR approvals, if so we should probably reconsider the arrangement. 😉 I do think there is value in having one person from each client team actively watching this repository though, so we don't get stuck with PRs that are stale because we aren't getting the right eyes on them.

@DockBoss

DockBoss commented Oct 1, 2021

Copy link
Copy Markdown
Contributor Author

@MicahZoltu @lightclient I am not sure if the edits to the build.js file are still needed, but I know that the rest of this PR is not needed anymore. If not I will close this PR

@MicahZoltu

Copy link
Copy Markdown

I haven't been following this PR particularly closely. If you think a subset of it is worth review/merge then we should get the extraneous pieces removed so the bits that are useful can be reviewed in isolation. In general, many small PRs are preferable to one large PR anyway. 😄

@lightclient lightclient closed this Nov 2, 2021
jshufro pushed a commit to jshufro/execution-apis that referenced this pull request Jan 14, 2026
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.

6 participants