-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Correct mbed export with multiple --source params #6143
Conversation
/morph build |
Build : SUCCESSBuild number : 1228 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 898 |
Test : SUCCESSBuild number : 1029 |
/morph uvisor-test |
1 similar comment
/morph uvisor-test |
Damn it, it figures this would happen... @theotherjimmy gonna need a rebase. |
tools/project.py
Outdated
type=argparse_filestring_type, | ||
dest="build_dir", | ||
default=None, | ||
help="The source (input) directory") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this flag not for the output directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a copy paste error.
@@ -46,7 +46,7 @@ def setup_project(ide, target, program=None, source_dir=None, build=None, export | |||
project_name = TESTS[program] | |||
else: | |||
project_name = basename(normpath(realpath(source_dir[0]))) | |||
src_paths = source_dir | |||
src_paths = {relpath(path, project_dir): [path] for path in source_dir} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if project_dir gets set to export_path but export_path (build argument) doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relpath will still work correctly. According to the docs; no fs access is done to verify the existence of the path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But what about later when the exporter tries to put files there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just check this out and try it. Give me a bit.
12828f2
to
262c737
Compare
@cmonr Rebased. |
/morph build |
Build : SUCCESSBuild number : 1305 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 965 |
Test : SUCCESSBuild number : 1089 |
Waiting on @sarahmarshy for the check. |
Merging since waited several days without hearing back. |
Resolves ARMmbed/mbed-cli#590
What does this allow?
Unusual project structures
I have a project structured like:
And I want to export. Using the new configuration available on master of Mbed CLI:
@theotherjimmy's online compiler testing offline
😄