Giter VIP home page Giter VIP logo

Comments (8)

matthijskooijman avatar matthijskooijman commented on June 2, 2024

I wonder if the full path to the platform.txt might be more useful, but I guess you don't have access to that information right there.

from arduino-builder.

ffissore avatar ffissore commented on June 2, 2024

I do but it would be quite a change in how error messages are reported. That one as well as others came straight from the IDE. Let's keep them this way for some time and see how much feedback comes

from arduino-builder.

matthijskooijman avatar matthijskooijman commented on June 2, 2024

Looking more closely at the check that causes this error message makes me wonder if it needs to be present at all? Why would arduino-builder enforce having a compiler.path variable? It seems this is an implementation detail of the specific platform. If the platform does not want a compiler.path, but wants to code the path directly int the recipes, or perhaps have c-compiler.path and cpp-compiler.path that should also be possible and this check can be entirely removed?

The reason the check is present, I think, is that the compiler used to define compiler.path, but now platforms should define it themselves. Instead of checking for compiler.path explicitely, wouldn't it be more useful to check for any undefined placeholders inside recipes? That might catch even more problems, and lead to better error messages (I've seen gcc complain with "invalid mcu specified: {board.mcu}" or something similar when for some reason board.mcu is not defined).

If the check stays, I think it should allow an empty string as a valid value, which it currently does not. This is what caused the error here: I have overridden compiler.path to the empty value, so the system-wide avr-gcc is used instead of the bundled one.

from arduino-builder.

ffissore avatar ffissore commented on June 2, 2024

Uhm yeah, I think it's a legacy from old IDE versions. @cmaglie what do you think? Can you get rid of that check?

from arduino-builder.

cmaglie avatar cmaglie commented on June 2, 2024

For me it can be removed.

This commit contains a bit of history:
arduino/Arduino@a89f5e6

from arduino-builder.

cmaglie avatar cmaglie commented on June 2, 2024

(edited the previous comment)

Previously the compiler.path was set by the IDE to the shipped avr-gcc or, if not found, to the system wide avr-gcc. This has been removed with the latest IDE from long time, so I guess the variable is no longer mandatory.

from arduino-builder.

ffissore avatar ffissore commented on June 2, 2024

Thanks @cmaglie, warning removed

from arduino-builder.

matthijskooijman avatar matthijskooijman commented on June 2, 2024

Right, so it was originally a warning and set a default compiler.path value, but it turned into an error with arduino-builder. Seems like a good thing to remove it now indeed. Also, yay for detailed commit messages ;-)

from arduino-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.