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

Navigation external font breaks build with new @swc/core #1859

Closed
1 task done
FintasticMan opened this issue Sep 14, 2023 · 1 comment
Closed
1 task done

Navigation external font breaks build with new @swc/core #1859

FintasticMan opened this issue Sep 14, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@FintasticMan
Copy link
Member

FintasticMan commented Sep 14, 2023

Verification

  • I searched for similar bug reports (including closed issues) and found none was relevant.

What happened?

Since 44d1798, the build breaks when using a version of @swc/core newer than 1.3.39.

What should happen instead?

No response

Reproduction steps

  1. Install the npm packages required to build InfiniTime, lv_font_conv, lv_img_conv and @swc/core.
  2. Try to build the firmware with the BUILD_RESOURCES CMake option enabled.
  3. Notice the following error:
click to show error
/home/finlay/programming/InfiniTime/node_modules/lv_img_conv/lib/image-q/utils/point.ts:85
    this.r = point.r;
                   ^
TypeError: Cannot read properties of undefined (reading 'r')
    at Point.from (/home/finlay/programming/InfiniTime/node_modules/lv_img_conv/lib/image-q/utils/point.ts:85:20)
    at ErrorDiffusionArray.<anonymous> (/home/finlay/programming/InfiniTime/node_modules/lv_img_conv/lib/image-q/image/array.ts:128:15)
    at step (/home/finlay/programming/InfiniTime/node_modules/lv_img_conv/lib/image-q/image/array.ts:205:23)
    at Object.next (/home/finlay/programming/InfiniTime/node_modules/lv_img_conv/lib/image-q/image/array.ts:146:20)
    at Immediate.next (/home/finlay/programming/InfiniTime/node_modules/lv_img_conv/lib/image-q/basicAPI.ts:163:33)
    at processImmediate (node:internal/timers:478:21)
Traceback (most recent call last):
  File "/home/finlay/programming/InfiniTime/src/resources/generate-img.py", line 56, in <module>
    main()
  File "/home/finlay/programming/InfiniTime/src/resources/generate-img.py", line 51, in main
    subprocess.check_call(line)
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/finlay/programming/InfiniTime/node_modules/.bin/lv_img_conv', '/home/finlay/programming/InfiniTime/src/resources/images/navigation1.png', '--force', '--output-file', 'navigation1.bin', '--color-format', 'CF_INDEXED_1_BIT', '--output-format', 'bin', '--binary-format', 'ARGB8565_RBSWAP']' returned non-zero exit status 1.

More details?

As a temporary solution, I've updated my pull request #1764 to pin @swc/core to version 1.3.39.

The issue seems to be caused by the use of the CF_INDEXED_1_BIT colour format. It is most likely an issue with lv_img_conv.

Version

main

Companion app

No response

@FintasticMan FintasticMan added the bug Something isn't working label Sep 14, 2023
@FintasticMan
Copy link
Member Author

Fixed by #1863.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant