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

Re-factor the PDFScriptingManager-class for the viewer-components #16687

Merged
merged 3 commits into from
Jul 16, 2023

Conversation

Snuffleupagus
Copy link
Collaborator

Currently this class contains a few "special" code-paths for the COMPONENTS build-target, which normally wouldn't be a problem. However, in this particular case that means accessing code that we don't want to include unconditionally in all builds.
This is currently implemented using build-time require-calls which we nowadays want to avoid, and we should strive to remove all such cases from the code-base. (Generally speaking import is the future, and build-tools may not always play well with a mix of both formats.)

We can easily improve things here by using sub-classing for the COMPONENTS build-target, and then use the ability to re-name when exporting (to avoid breaking existing code).

@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

Currently this class contains a few "special" code-paths for the COMPONENTS build-target, which normally wouldn't be a problem. However, in this particular case that means accessing code that we don't want to include unconditionally in all builds.
This is currently implemented using build-time `require`-calls which we nowadays want to avoid, and we should strive to remove all such cases from the code-base. (Generally speaking `import` is the future, and build-tools may not always play well with a mix of both formats.)

We can easily improve things here by using sub-classing for the COMPONENTS build-target, and then use the ability to re-name when exporting (to avoid breaking existing code).
Having a `require` in this file has never made sense in e.g. the Firefox PDF Viewer and shouldn't really be necessary.
Possibly the idea was to facilitate some kind of third-party bundling, however the *built* `pdf.js` file has always exposed the API-contents globally.
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@mozilla mozilla deleted a comment from moz-tools-bot Jul 16, 2023
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/b5c60d57fee8135/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/b5c60d57fee8135/output.txt

Total script time: 1.32 mins

Published

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/35acbca57144e78/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/15469477dbf705d/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/35acbca57144e78/output.txt

Total script time: 25.00 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 19
  different first/second rendering: 2

Image differences available at: http://54.241.84.105:8877/35acbca57144e78/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/15469477dbf705d/output.txt

Total script time: 37.25 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 28
  different first/second rendering: 1

Image differences available at: http://54.193.163.58:8877/15469477dbf705d/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit d03a8d0 into mozilla:master Jul 16, 2023
3 checks passed
@timvandermeij
Copy link
Contributor

Looks good to me!

@Snuffleupagus Snuffleupagus deleted the rm-more-require branch July 16, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants