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

Correct mbed export with multiple --source params #6143

Merged
merged 2 commits into from
Mar 6, 2018

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Feb 20, 2018

Resolves ARMmbed/mbed-cli#590

What does this allow?

Unusual project structures

I have a project structured like:

fat-fs
├── README.md
└── main.cpp
mbed-os

And I want to export. Using the new configuration available on master of Mbed CLI:

# mbed config MBED_OS_DIR mbed-os
# mbed export -i make_gcc_arm -m k64f --source fat-fs --source mbed-os --build .
# make -j

@theotherjimmy's online compiler testing offline

😄

0xc0170
0xc0170 previously approved these changes Feb 21, 2018
@0xc0170 0xc0170 changed the title Correct mbed export with mutliple --source params Correct mbed export with multiple --source params Feb 21, 2018
@cmonr
Copy link
Contributor

cmonr commented Feb 23, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Feb 23, 2018

Build : SUCCESS

Build number : 1228
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6143/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Feb 23, 2018

@mbed-ci
Copy link

mbed-ci commented Feb 23, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 23, 2018

/morph uvisor-test

1 similar comment
@cmonr
Copy link
Contributor

cmonr commented Feb 23, 2018

/morph uvisor-test

@cmonr
Copy link
Contributor

cmonr commented Feb 26, 2018

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")
Copy link
Contributor

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?

Copy link
Contributor Author

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}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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.

@theotherjimmy
Copy link
Contributor Author

@cmonr Rebased.
@sarahmarshy Rebase includes corrections indicated in review.

@cmonr
Copy link
Contributor

cmonr commented Feb 28, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Feb 28, 2018

Build : SUCCESS

Build number : 1305
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6143/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Feb 28, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 1, 2018

@cmonr
Copy link
Contributor

cmonr commented Mar 1, 2018

Waiting on @sarahmarshy for the check.

@cmonr
Copy link
Contributor

cmonr commented Mar 6, 2018

Merging since waited several days without hearing back.

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.

None yet

6 participants