Refactor: Make ValidationErrorReporter interface better.#3438
Merged
Conversation
Historically, this did not cause a config-time error, only a runtime error. Probably nobody depends on this bug, but I'd prefer not to have to roll back this change if I'm wrong, so I'll maintain the behavior for now.
jasnell
reviewed
Jan 30, 2025
jasnell
approved these changes
Jan 30, 2025
Collaborator
|
Looks like you're missing a |
This interface evolved from early beginnings where we didn't really know where we were going, and as a result was quite warty in the way that it reported entrypoints: * It would report each _method_ of stateless entrypoints with a separate call, rather than reporting the whole entrypoint at once. All of the implementations had to group these back into entrypoints using HashMaps. * It reported a Durable Object class as if it were an entrypoint with a single method called "class". This sort of made sense back when there was a fixed list of handler names, but the introduction of RPC made this very weird. Evidence of why this was a bad interface can be seen in the previous commit, which introduces tests for three different bugs that I discovered just while refactoring this interface. In any case, this changes the interface to just make sense.
183b448 to
842d84c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This interface evolved from early beginnings where we didn't really know where we were going, and as a result was quite warty in the way that it reported entrypoints:
Evidence of why this was a bad interface can be seen in the first commit of this PR, which introduces tests for three different bugs that I discovered just while refactoring this interface.
In any case, this changes the interface to just make sense.