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

fix regression in ace-builds loading #5218

Merged
merged 1 commit into from
Jun 27, 2023
Merged

fix regression in ace-builds loading #5218

merged 1 commit into from
Jun 27, 2023

Conversation

nightwing
Copy link
Member

fixes https://github.com/ajaxorg/ace-builds/issues/247#issuecomment-1609409571 and e14902e#commitcomment-119729446

Testing is not included, will add puppeteer tests to https://github.com/ajaxorg/ace-samples, checking editor functionality in all configurations to prevent issues like this in the future

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ce4674a) 87.22% compared to head (917712d) 87.22%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5218   +/-   ##
=======================================
  Coverage   87.22%   87.22%           
=======================================
  Files         565      565           
  Lines       45251    45253    +2     
  Branches     6927     6927           
=======================================
+ Hits        39469    39471    +2     
  Misses       5782     5782           
Flag Coverage Δ
unittests 87.22% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/config.js 84.69% <100.00%> (+0.31%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

// backwards compatibility for node and packaged version
try {
loadedModule = this.$require(moduleName);
} catch (e) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it good to catch all errors? would it not be better to check whether the method exists or something similar

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require itself may throw errors when moduleName is not loaded yet, this basically restores the old code, before my commit that introduced the regression. I could also move try catch into $require itself, but then i'd have to add that in two places.

@nightwing nightwing merged commit 8cd0b60 into master Jun 27, 2023
@nightwing nightwing deleted the fix-ace-builds branch June 27, 2023 16:21
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.

嗨,最新的react-ace构建出来的东西有问题,是ace-builds上周更新的问题导致的么?
2 participants