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

Improve documentation of data format of dependency inputs #73

Open
3 tasks done
faultfactory opened this issue Sep 12, 2022 · 1 comment
Open
3 tasks done

Improve documentation of data format of dependency inputs #73

faultfactory opened this issue Sep 12, 2022 · 1 comment
Assignees
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement

Comments

@faultfactory
Copy link

Describe the problem

Supplying the board source-url for the BM .json file via the platform scheme documented does not work.

I searched through the python file to get it working and appended the URL to the fqbn field in my action file and it worked.

Please update the docs, or make the code match the docs.

To reproduce

Attempt to use a 3rd party board given the instructions in the action documentation.

This failed and gave an error indicating the information was parsed incorrectly.

      - name: Compile Arduino Sketches
        uses: arduino/compile-sketches@v1
        with:
          fqbn: 'adafruit:samd:adafruit_feather_m4_can'
          platforms:  |
            - name: "adafruit:samd"
            - source-url: "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json"
          libraries: |
            - name: CAN Adafruit Fork
            - name: SafeString

This worked:

- name: Compile Arduino Sketches
        uses: arduino/compile-sketches@v1
        with:
          fqbn: 'adafruit:samd:adafruit_feather_m4_can https://adafruit.github.io/arduino-board-index/package_adafruit_index.json'
          libraries: |
            - name: CAN Adafruit Fork
            - name: SafeString

Expected behavior

Explained above.

'arduino/compile-sketches' version

v1.0.1

Additional context

No response

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
@faultfactory faultfactory added the type: imperfection Perceived defect in any part of project label Sep 12, 2022
@per1234
Copy link
Collaborator

per1234 commented Sep 13, 2022

Hi @faultfactory. Thanks for your report. Each of the elements of the platforms input list is a separate platform definition object. These objects consist of the keys mentioned in the documentation.

Your code here:

platforms:  |
  - name: "adafruit:samd"
  - source-url: "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json"

contains two separate platform definition objects, one for each of the elements of the list. So you have specified that a platform with the ID adafruit:samd should be installed, then you have specified that different platform with Boards Manager package index https://adafruit.github.io/arduino-board-index/package_adafruit_index.json should be installed.

But what you were intended to do was specify a single platform. To do that, all keys must be in the same element, like this:

platforms:  |
  - name: "adafruit:samd"
    source-url: "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json"

So the documentation is correct, and the action works just as documented. However, I think this indicates it is not as clear as it should be. We can use this issue to track the need to improve on that.

Probably the most helpful thing would be to provide a dedicated example snippet for each of the source type sections under the platforms input documentation (currently there is only at the top level section of that documentation).

I think the wording could also be improved to be more clear.

If anyone wants to submit pull requests proposing improvements to the documentation, I would be happy to review them.

appended the URL to the fqbn field

The code that allows that was added to provided backwards compatibility for workflows using the poorly designed API of the earliest alpha version of the action. It is deprecated and might be removed at any time. Use of that API is strongly discouraged.

@per1234 per1234 self-assigned this Sep 13, 2022
@per1234 per1234 added topic: documentation Related to documentation for the project type: enhancement Proposed improvement and removed type: imperfection Perceived defect in any part of project labels Sep 13, 2022
@per1234 per1234 changed the title Documentation for additional boards URL does not match funciton Improve documentation of data format of dependency inputs Sep 13, 2022
henrygab added a commit to SimpleHacks/QDEC that referenced this issue Sep 21, 2022
But, this **should** work, per
arduino/compile-sketches#73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants