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

Depend on a library using GitHub URL #498

Closed
probonopd opened this Issue Feb 6, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@probonopd

probonopd commented Feb 6, 2016

Wouldn't it be nice if we could
#include "https://raw.githubusercontent.com/Makuna/NeoPixelBus/814a4f0250d408b6f0b7252537352ce0b93e4b3d/src/NeoPixelBus.h"?

Golang seems to work somewhat like this, iirc.

The result would be painless dependency management:

  • Can reference any specific commit of any library on GitHub - even feature branches and development versions
  • Do not need to wait for libraries to be "included" or "submitted" to any central repository

Rough idea of how to implement:
At compile time, platformio would have to download the URLs and any files referenced therein, place them into .pioenvs, and replace the URL include statement with one that would reference the downloaded local file.

@loopj

This comment has been minimized.

Show comment
Hide comment
@loopj

loopj Feb 28, 2016

This would effectively require code parsing and rewriting, which seems a little funky in c/c++ land. Go already has this concept built in to the language.

Having github urls in the code would make for very unportable code, and would tightly bind code to platformio's build system.

Just my 2c.

loopj commented Feb 28, 2016

This would effectively require code parsing and rewriting, which seems a little funky in c/c++ land. Go already has this concept built in to the language.

Having github urls in the code would make for very unportable code, and would tightly bind code to platformio's build system.

Just my 2c.

@gerritv

This comment has been minimized.

Show comment
Hide comment
@gerritv

gerritv Feb 28, 2016

You assume that everything is connected to the internet all the time, not something you should count on. Also any notion of repeatable builds goes out the door. No serious development organization would use this. There is no Change Management (those parts of your code can change at the other parties whim while you are building),non repeatable builds, no sane possibility of source code control.

Plus not to mention that you expect platformio to parse your entire source code looking for #include lines (possibly inside #ifdef's!) before calling the compiler.

gerritv commented Feb 28, 2016

You assume that everything is connected to the internet all the time, not something you should count on. Also any notion of repeatable builds goes out the door. No serious development organization would use this. There is no Change Management (those parts of your code can change at the other parties whim while you are building),non repeatable builds, no sane possibility of source code control.

Plus not to mention that you expect platformio to parse your entire source code looking for #include lines (possibly inside #ifdef's!) before calling the compiler.

@probonopd

This comment has been minimized.

Show comment
Hide comment
@probonopd

probonopd Feb 28, 2016

Also any notion of repeatable builds goes out the door.

Not if you include a specific SHA-1 hash

probonopd commented Feb 28, 2016

Also any notion of repeatable builds goes out the door.

Not if you include a specific SHA-1 hash

@ivankravets ivankravets added this to the 3.0.0 milestone Jul 16, 2016

@ivankravets ivankravets added the feature label Jul 16, 2016

@ivankravets ivankravets self-assigned this Jul 16, 2016

@ivankravets ivankravets added the lib label Jul 16, 2016

@ivankravets

This comment has been minimized.

Show comment
Hide comment
@ivankravets

ivankravets Jul 16, 2016

Member

The parse source code and replace with real includes will bring a lot of problems to the different parts of PlatformIO. The integration with IDEs will not works. Code completion and code linting services will raise a lot of errors.

In any case, I'll allow defining of "dependency" as "git" URL.

Member

ivankravets commented Jul 16, 2016

The parse source code and replace with real includes will bring a lot of problems to the different parts of PlatformIO. The integration with IDEs will not works. Code completion and code linting services will raise a lot of errors.

In any case, I'll allow defining of "dependency" as "git" URL.

@ivankravets ivankravets changed the title from Include library dependencies using their GitHub URLs to Depend on a library using GitHub URL Jul 16, 2016

@ivankravets ivankravets referenced this issue Jul 16, 2016

Closed

PlatformIO 3.0 Roadmap #423

28 of 37 tasks complete

ivankravets added a commit that referenced this issue Sep 9, 2016

Merge branch 'develop' into feature/unicode-issue-771
* develop:
  Fix incorrect line order when converting from INO to CPP and pointer is used
  Fix unit test
  Notify about `version` field when creating library
  Add support for SparkFun Blynk Board
  Return valid exit code from ``plaformio test`` command
  Disable SSL Server-Name-Indication for Python < 2.7.9
  Version bump to 3.0.1 (issue #772)
  Disable temporary SSL for PlatformIO services // Resolve #772
  Version bump to 3.0.0 (issues #770, #766, #747, #730, #765, #640, #659, #742, #459, #542, #763, #759, #753, #757, #749, #748, #745, #519, #709, #743, #413, #498, #410, #740, #361, #414, #554, #732, #588, #475, #461, #101, #719, #721, #537, #415, #522, #289, #556, #570, #456, #617, #432, #408, #479, #667, #510)
  Fix menu height for  docs
  Fix issue with multiple archives when linking firmware
  Add migration guide for PIO2 to PIO3
  Search libraries by headers/includes with ``platformio lib search --header`` option
  Update pio run command examples
  Add Unit Testing Demo
  Update PIO Plus badge title and link
  Add PlatformIO Plus badge
  Add links to PlatformIO Plus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment