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

Revise checking toolchain path #2675

Merged
merged 4 commits into from
Sep 16, 2016
Merged

Conversation

sarahmarshy
Copy link
Contributor

@sarahmarshy sarahmarshy commented Sep 12, 2016

Mbed-cli is responsible for checking toolchain paths for executables that will be used for compilation.

@screamerbg

nested_dir=None):
"""
Positional args:
tool_key: the key to index TOOLCHAIN_PATHS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are only indexing, should we just pass the list of paths itself?

Copy link
Contributor Author

@sarahmarshy sarahmarshy Sep 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess it is an argument for clarity/readability. I feel like it looks better this way from each respective toolchain point of view, and this function shows where that path comes from. Just passing in **["ARM", "armcc", 2, "bin"] looks better to me than **[TOOLCHAIN_PATHS["ARM"], "armcc", 2, "bin"] (Though I will admit that neither look great, but I am open to suggestions).

Copy link
Contributor Author

@sarahmarshy sarahmarshy Sep 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it is better to have the key, because this line:

TOOLCHAIN_PATHS[tool_key] = exe

changes the value

@sarahmarshy sarahmarshy force-pushed the toolchain_path_check branch 2 times, most recently from ceec6d5 to 0210764 Compare September 13, 2016 18:56
@theotherjimmy
Copy link
Contributor

This looks like a better method of validating the existence of the toolchains. @screamerbg Will this work with the online compiler?

@theotherjimmy
Copy link
Contributor

I actually really like this method, as it makes it possible to auto-detect which toolchain to use for a compile when none is specified.

@theotherjimmy
Copy link
Contributor

Could we add check_executable as an abstractmethod to the mbedToolchain class too?

@screamerbg
Copy link
Contributor

Looks great! Thanks, Sarah!

@screamerbg
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 858

All builds and test passed!

@screamerbg
Copy link
Contributor

LGTM
Cc @sg-

@sg- sg- merged commit a6f4b58 into ARMmbed:master Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants