This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
fix: correctly detect conflicting function names consistently #1258
Conversation
This file contains 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
danez
commented
Nov 4, 2022
@@ -47,6 +47,8 @@ export const zipFixture = async function ( | |||
const bundlerString = getBundlerNameFromConfig(config) || 'default' | |||
const { path: tmpDir } = await getTmpDir({ | |||
prefix: `zip-it-test-bundler-${bundlerString}`, | |||
// Cleanup the folder on process exit even if there are still files in them | |||
unsafeCleanup: true, |
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.
We never clean the temp folders, because there are still files left in them. With this change we do force remove the tmp folders on process exit.
danez
commented
Nov 4, 2022
@@ -73,7 +73,7 @@ export const makeTestMany = <M extends string>( | |||
const testFns = ['fails', 'only', 'concurrent', 'skip', 'todo'] | |||
|
|||
testFns.forEach((fn) => { | |||
testBundlers[fn] = ((...args) => testBundlers(...args, test[fn])) as TestMany<M> | |||
testBundlers[fn] = ((...args) => testBundlers(...args, testAPI[fn])) as TestMany<M> |
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 does not really mattter, but it is cleaner to use the testAPI that is supplied to the makeTestMany()
which is also test
, instead of using test
directly.
β± Benchmark resultsComparing with a7517a7 largeDepsEsbuild: 3.1sβ¬οΈ 0.70% increase vs. a7517a7
LegendlargeDepsNft: 15sβ¬οΈ 3.12% decrease vs. a7517a7
LegendlargeDepsZisi: 21.6sβ¬οΈ 4.32% decrease vs. a7517a7
|
jackiewmacharia
approved these changes
Nov 7, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
I was investigating why the tests fail sometimes. The tests ensure that when multiple files for the same function exist we always use the same order in how we detect them.
My first thought was it has to do with async stuff in the tests, just to figure out during my perf change I did change
locate-path
to not preserve order, which triggers this flaky behavior.This reverts this change, plus some additional fixes for the tests, I run into on the way.
For us to review and ship your PR efficiently, please perform the following steps:
This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing
a typo or something that`s on fire π₯ (e.g. incident related), you can skip this step.
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)