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

Move file validation into program.validate() #504

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

TwitchBronBron
Copy link
Member

moves the file validation logic out of addReplaceFile and into program.validate(). This accomplishes several things:

  • aligns with the flow in v1 which makes more logical sense
  • improve performance slightly when typing in an editor because file validations get deferred until the validate phase
  • prevent file validation events on files shadowed by typedef files, which was a bug introduced in Move parse and validate events out to program level #494

This is technically a breaking change to the event flow.

Event flow prior to this change:

  • afterFileParse
  • beforeFileValidate
  • onFileValidate
  • afterFileValidate
  • beforeProgramValidate

Event flow after this change:

  • afterFileParse
  • beforeProgramValidate
  • beforeFileValidate
  • onFileValidate
  • afterFileValidate

@TwitchBronBron
Copy link
Member Author

@elsassph @georgejecook @markwpearce @triwav @chrisdp do any of you have concerns with this change in the event flow for v0?

@georgejecook
Copy link
Contributor

oh gosh.. let me check.

@TwitchBronBron TwitchBronBron merged commit 925d8d0 into master Feb 3, 2022
@TwitchBronBron TwitchBronBron deleted the unify-file-events branch February 3, 2022 19:45
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