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

stop trying to use the ecmarkdown parse tree from the linting phase #393

Merged
merged 2 commits into from
Dec 15, 2021

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Dec 15, 2021

I just noticed that 80959f0 doesn't work when passing --lint-spec, because that option moves the initial parse to an earlier phase and saves the result.

This PR drops that attempt to save on work and instead unconditionally parses the html again. This doesn't materially affect runtime, since ecmarkdown parsing is a tiny fraction of overall runtime (I did three runs building the spec with --lint-spec before and after this change and got [15.899s, 15.902s, 15.474s] and [15.799s, 15.620s, 15.297s] respectively).

We should maybe revisit this logic at some point, but this is fine for now.

I also updated the tests to run all the baselines with --lint-spec to ensure enabling linting doesn't affect the build output so this can't happen again. This adds 2 seconds to the test suite (on my machine), for about 8s -> 10s, which is a price I'm willing to pay.

@bakkot bakkot merged commit 2e7e5f2 into main Dec 15, 2021
@bakkot bakkot deleted the lint-spec-interaction branch December 15, 2021 23:05
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