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

Attempting to use arduino:avr git repository as source-url results in compilesketches.py crashing #310

Closed
3 tasks done
noisymime opened this issue Aug 12, 2024 · 2 comments · Fixed by #311
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@noisymime
Copy link

noisymime commented Aug 12, 2024

Describe the problem

Trying to use the the latest AVR core from github results in compilesketches.py crashing with the following error:

 Traceback (most recent call last):
  File "/home/runner/work/_actions/arduino/compile-sketches/v1.1.1/compilesketches/compilesketches.py", line 1709, in <module>
Installing Arduino CLI version latest
Installing platform from repository: https://github.com/arduino/ArduinoCore-avr.git
    main()  # pragma: no cover
    ^^^^^^
  File "/home/runner/work/_actions/arduino/compile-sketches/v1.1.1/compilesketches/compilesketches.py", line 63, in main
    compile_sketches.compile_sketches()
  File "/home/runner/work/_actions/arduino/compile-sketches/v1.1.1/compilesketches/compilesketches.py", line 219, in compile_sketches
    self.install_platforms()
  File "/home/runner/work/_actions/arduino/compile-sketches/v1.1.1/compilesketches/compilesketches.py", line 337, in install_platforms
    self.install_platforms_from_repository(platform_list=platform_list.repository)
  File "/home/runner/work/_actions/arduino/compile-sketches/v1.1.1/compilesketches/compilesketches.py", line 629, in install_platforms_from_repository
    destination_path = self.get_platform_installation_path(platform=platform)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_actions/arduino/compile-sketches/v1.1.1/compilesketches/compilesketches.py", line 562, in get_platform_installation_path
    for installed_platform in installed_platform_list:
TypeError: 'NoneType' object is not iterable
Error: Process completed with exit code 1.

To reproduce

Use the following configuration taken nearly verbatim from the FAQ page (https://github.com/arduino/compile-sketches/blob/main/docs/FAQ.md):

- uses: arduino/[email protected]
  with:
    platforms: |
      - source-url: https://github.com/arduino/ArduinoCore-avr.git
        name: arduino:avr

Expected behavior

If the source-url field is removed from the above example then everything works as expected. This should work identically with the github repository as the source as it does with the build in AVR core.

'arduino/compile-sketches' version

1.1.1

Additional context

This may be occurring when any other repository is specified also, but the AVR one is the only repo I've tried using as a source.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@per1234
Copy link
Collaborator

per1234 commented Aug 13, 2024

Thanks for your report @noisymime. The bug has now been fixed in #311 and that fix shipped in a new v1.1.2 release of the action.

Since you are currently pinning the action version, in order to get the fix in your workflow, you must change this line:

- uses: arduino/[email protected]

To this:

- uses: arduino/[email protected]

@noisymime
Copy link
Author

The bug has now been fixed in #311 and that fix shipped in a new v1.1.2 release of the action.

You legend! Thanks for looking at this so quickly @per1234 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
2 participants