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

Support for custom libraries when using sketch.yaml #2133

Open
3 tasks done
dmohns opened this issue Mar 29, 2023 · 10 comments · May be fixed by #2514
Open
3 tasks done

Support for custom libraries when using sketch.yaml #2133

dmohns opened this issue Mar 29, 2023 · 10 comments · May be fixed by #2514
Assignees
Labels
type: enhancement Proposed improvement

Comments

@dmohns
Copy link

dmohns commented Mar 29, 2023

Describe the request

In a project I am currently using different "kind" of libraries.

  1. Versioned libraries available in via Arduino Library Manager
  2. Non-versioned libraries available via their source code on Github
  3. Non-versioned libraries available via their source code in local subfolder folder of my project (zipped or raw)

To ease collaboration on the project I would like to use a Project Sketch File and provide a set of dependencies that are confirmed working.

Unfortunately, the Project Sketch File only seem to support 1. (versioned libraries available in Arduino Library Manager). Scope of this request is to add functionality to supply Github and local folder libraries to the libraries: attribute on sketch.yaml (in some fashion).

Describe the current behavior

Currently, I have been able to compile my project using

arduino-cli compile --fqbn "<FQBN>" --libraries=Library/

However, if I tried to use --profile and --libraries the compile command fails

You cannot use the --libraries flag while compiling with a profile.

Arduino CLI version

arduino-cli Version: nightly-20230329 Commit: b69ed33 Date: 2023-03-29T01:34:59Z

Operating system

macOS

Operating system version

12.6.3

Additional context

Additional requests

Related

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details
@dmohns dmohns added the type: enhancement Proposed improvement label Mar 29, 2023
@umbynos
Copy link
Contributor

umbynos commented Apr 7, 2023

Seems a duplicate of #108

@umbynos umbynos closed this as completed Apr 7, 2023
@umbynos umbynos self-assigned this Apr 7, 2023
@umbynos umbynos added the conclusion: duplicate Has already been submitted label Apr 7, 2023
@jirutka
Copy link

jirutka commented Nov 7, 2023

Seems a duplicate of #108

It’s not a duplicate, #108 is just one of the ways it can be implemented (and more complicated than requested here).

@cmaglie cmaglie reopened this Nov 10, 2023
@dmohns
Copy link
Author

dmohns commented Nov 13, 2023

Yeah, just to clarify, this issue is about making sketch.yaml spec more flexible to support libraries from other sources than Arduino Library Manager.

One way that is backwards compatible would be

profiles:
  <PROFILE_NAME>:
    ....
    libraries:
      - <LIB_NAME> (<LIB_VERSION>)

to allow <LIB_VERSION> to be <LIB_VERSION_OR_URL> and take the form of VCS and local urls, for example

profiles:
  my_profile:
    ....
    libraries:
      - ArduinoIoTCloud (1.0.2)
      - HelloWorld (https://github.com/username/HelloWorld.git#v2.13)
      - HelloWorld2 (file://./libraries/HelloWorld2.zip)

Note: Above is just an example. There are other ways to implements this as well, like changing the schema of libraries to be a list of dicts rather list of strings. This would be more powerful and flexible but not be backwards compatible.

@eesoymilk

This comment has been minimized.

@ubidefeo

This comment has been minimized.

@eesoymilk

This comment has been minimized.

@dmohns

This comment has been minimized.

@umbynos umbynos assigned cmaglie and unassigned umbynos Jan 18, 2024
@umbynos umbynos removed the conclusion: duplicate Has already been submitted label Jan 26, 2024
@tyeth
Copy link

tyeth commented Jul 23, 2024

Just bumping this, keen on git urls (with refs) in the version string spot, and adding a related note in case @cmaglie / anyone implements this feature...

As mentioned at the end of #108, it would be nice if profiles could support inheritance from a common build profile (we have 60 common libs to list), and then also share these custom libraries linked via git refs too.

We have 9 git-based libs for users to install, two on non-default untagged branches (using sha ref), and a few build profiles (23 targets but I'm assuming user can switch FQBN target and still use a base build profile) hence the interest in this feature.

@egnor

This comment has been minimized.

@hasselmm

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants