SolarCalculator icon indicating copy to clipboard operation
SolarCalculator copied to clipboard

add library.json file

Open james-shoemaker opened this issue 2 years ago • 8 comments
trafficstars

PlatformIO works better with a library.json file. I realize the file isn't completely correct, but my platformIO native test builds don't work without it.

james-shoemaker avatar Jan 16 '23 00:01 james-shoemaker

PlatformIO is supposed to support the library.properties manifest. Do you know why it doesn't work in some cases?

If there's a particular character or field it doesn't like, I can fix the current file.

jpb10 avatar Jan 16 '23 14:01 jpb10

I know it's supposed to support the properties file, but it doesn't work for me without the .json version. Without the json file I get this error:

lib/sunrisesunset/sunrisesunset.cpp:3:10: fatal error: SolarCalculator.h: No such file or directory


  • Looking for SolarCalculator.h dependency? Check our library registry!
  • CLI > platformio lib search "header:SolarCalculator.h"
  • Web > https://registry.platformio.org/search?q=header:SolarCalculator.h

3 | #include <SolarCalculator.h>
  |          ^~~~~~~~~~~~~~~~~~~

compilation terminated.

With the .json file tests run clean. I've even removed the include and platform lines from the json and it still works. I have no idea why. It's not a big issue, I can maintain my fork easily.

On Mon, Jan 16, 2023 at 8:24 AM jpb10 @.***> wrote:

PlatformIO is supposed to support the library.properties manifest. Do you know why it doesn't work in some cases?

If there's a particular character or field it doesn't like, I can fix the current file.

— Reply to this email directly, view it on GitHub https://github.com/jpb10/SolarCalculator/pull/19#issuecomment-1384142624, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS2FAEMOJ2XM5DH27JX623WSVKZNANCNFSM6AAAAAAT4EXSWU . You are receiving this because you authored the thread.Message ID: @.***>

james-shoemaker avatar Jan 17 '23 14:01 james-shoemaker

Let me look into it, I don't mind adding the json file if necessary.

jpb10 avatar Jan 17 '23 15:01 jpb10

If it would help I could either give you a login to my gitlab server or upload the project to another location, the project this occurs in is actually very small.

James

On Tue, Jan 17, 2023 at 9:22 AM jpb10 @.***> wrote:

Let me look into it, I don't mind adding the json file if necessary.

— Reply to this email directly, view it on GitHub https://github.com/jpb10/SolarCalculator/pull/19#issuecomment-1385592481, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS2FAGRUPIJKM5NC6PH5MTWS22KDANCNFSM6AAAAAAT4EXSWU . You are receiving this because you authored the thread.Message ID: @.***>

james-shoemaker avatar Jan 17 '23 16:01 james-shoemaker

Yes, whatever you prefer.

Also, consider asking the people at platformio... it could be very obvious to them.

jpb10 avatar Jan 18 '23 03:01 jpb10

https://github.com/james-w-shoemaker/esp-sunrisesunset

pio test to run the tests, it pulls from my fork so things work. Change https://github.com/james-shoemaker/SolarCalculator.git in platformio.ini and library.json to point to jpb10/SolarCalculator to make it hit your repo. or just remove the library.json file from the .pio tree.

On Tue, Jan 17, 2023 at 9:59 PM jpb10 @.***> wrote:

Yes, whatever you prefer.

Also, consider asking the people at platformio... it could be very obvious to them.

— Reply to this email directly, view it on GitHub https://github.com/jpb10/SolarCalculator/pull/19#issuecomment-1386450533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS2FAALTI5U4VVI3TZCAVLWS5TCJANCNFSM6AAAAAAT4EXSWU . You are receiving this because you authored the thread.Message ID: @.***>

james-shoemaker avatar Jan 18 '23 16:01 james-shoemaker

Can you try adding the following line to platformio.ini:

lib_compat_mode = off

This seems to get past the library dependency finder issues, but I'm getting various undeclared/undefined errors... so I'm not able to finish the build.

jpb10 avatar Jan 21 '23 19:01 jpb10

That does resolve the issue for that project. I'll experiment and see if it causes any issues. Odd you are getting undeclared/undefined things, I don't.

James

On Sat, Jan 21, 2023 at 1:08 PM jpb10 @.***> wrote:

Can you try adding the following line to platformio.ini:

lib_compat_mode = off

This seems to get past the library dependency finder issues, but I'm getting various undeclared/undefined errors... so I'm not able to finish the build.

— Reply to this email directly, view it on GitHub https://github.com/jpb10/SolarCalculator/pull/19#issuecomment-1399313855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS2FAFUBY7OEI2COE44KRTWTQX3LANCNFSM6AAAAAAT4EXSWU . You are receiving this because you authored the thread.Message ID: @.***>

james-shoemaker avatar Jan 23 '23 16:01 james-shoemaker