-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix(node): Resolve ace_ibma.Checker is not a constructor error #1831
Closed
Rahul-Sivananda
wants to merge
5
commits into
IBMa:master
from
Rahul-Sivananda:fix-reuse-ace-node-file
Closed
fix(node): Resolve ace_ibma.Checker is not a constructor error #1831
Rahul-Sivananda
wants to merge
5
commits into
IBMa:master
from
Rahul-Sivananda:fix-reuse-ace-node-file
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
Currently, the generated `ace-node.js` file is updated multiple times in threads. This commit reads the `ace-node.js` file if it exists and will create the accessibility checker without overwriting the file. Another change is to throw error if there was a problem in writing the `ace-node.js` file instead of attempting to create the constructor from the non existing file.
The current generated file name is stored as <cache-folder>/ace-node.js If the cache folder is not cleared, this would cause problems when either rule archive or package version is changed as we are no longer overwriting the file Suffixing rule and package version to the file name prevent this from happening.
tombrunet
previously approved these changes
Feb 12, 2024
philljenkins
changed the title
fix(node): resolve ace_ibma.Checker is not a constructor error
fix(node): Resolve ace_ibma.Checker is not a constructor error
Feb 15, 2024
the github actions set ruleArchiveVersion as <pr_number>/merge, this is obtained through GITHUB_REF environment variable, and this problems in the github actions. The version should be a valid file name that can be used in both unix and non unix filesystems. This PR sets the commit sha obtained from GITHUB_SHA environment variable as the ruleArchiveVersion
I replaced |
…ge/ from variable
Moving to #1845 |
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.
ace_ibma.Checker is not a constructor error
This PR is related to the following issue(s):
Additional information can be found here:
Currently, the generated
ace-node.js
file is updated multiple times when running in multiple threads, causing theace_ibma.Checker is not a constructor
error while reading it when the file is being overwritten.This commit does the following things:
ace-node.js
file if it exists and create the accessibility checker without overwriting the file.ace-node.js
file instead of attempting to create the constructor from the non-existing file.Due to the above change, we must update the generated file name.
The current file is stored as
<cache-folder-name>/ace-node.js
. If the cache folder is not cleared, this would cause issues when either rule archive or package version is changed, as we are no longer overwriting the file.Suffixing rule and package version to the file name (e.g.
ace-node-3.0.0-3.1.67.js
) prevents this from happening.Testing reference:
To test, run multiple accessibility tests using jest parallelly,
ace_ibma.Checker is not a constructor error
should not occur.To verify that the generated file is not being overwritten, run
fswatch -uvx <cache-folder-path>
I have conducted the following for this PR: