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

Remove ColorSpaceUtils.parseAsync and simplify the ColorSpace "API-surface" #19599

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Mar 3, 2025

This patch reduces the number of ColorSpaceUtils static-methods, and in particular the parseAsync method is removed and it's now instead possible to have parse optionally return a Promise.
This thus removes the need to manually check if a ColorSpace-instance is cached, note the changes in the src/core/evaluator.js file.

@Snuffleupagus
Copy link
Collaborator Author

@calixteman I've been thinking about your comments the other day, and I can agree that the current "API-surface" of ColorSpace is a little unwieldy.
Is this at least somewhat close to what you had in mind, to simplify things here?

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@Snuffleupagus Snuffleupagus force-pushed the ColorSpace-rm-parseAsync branch 3 times, most recently from 9d9a2a4 to 0fa01aa Compare March 5, 2025 10:59
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@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/27411087c1eebaf/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/27411087c1eebaf/output.txt

Total script time: 29.79 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 4

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

…surface"

This patch reduces the number of `ColorSpaceUtils` static-methods, and in particular the `parseAsync` method is removed and it's now instead possible to have `parse` optionally return a Promise.
This thus removes the need to manually check if a `ColorSpace`-instance is cached, note the changes in the `src/core/evaluator.js` file.
@Snuffleupagus Snuffleupagus force-pushed the ColorSpace-rm-parseAsync branch from 0fa01aa to fbf1f2b Compare March 5, 2025 11:44
@Snuffleupagus Snuffleupagus changed the title Remove ColorSpace.parseAsync and simplify the ColorSpace "API-surface" Remove ColorSpaceUtils.parseAsync and simplify the ColorSpace "API-surface" Mar 5, 2025
@Snuffleupagus
Copy link
Collaborator Author

/botio browsertest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 16.68 mins

  • Regression tests: Passed

@Snuffleupagus Snuffleupagus merged commit fedfdf9 into mozilla:master Mar 5, 2025
9 checks passed
@Snuffleupagus Snuffleupagus deleted the ColorSpace-rm-parseAsync branch March 5, 2025 12:12
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.

None yet

3 participants