Skip to content

Online: Include project root path #8660

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

Merged
merged 2 commits into from
Nov 9, 2018

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Nov 6, 2018

Description

The prior logic assumed that "." would not be added to the include
paths, indicating that the project root would not be added to the
include paths correctly in the online environment ("." would be
incorrect there). This change set started by removing the addition
of ".", and then fixed building from there.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

### Description

The prior logic assumed that "." would not be added to the include
paths, indicating that the project root would not be added to the
include paths correctly in the online environment ("." would be
incorrect there). This change set started by removing the addition
of "*.", and then fixed building from there.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
@cmonr cmonr requested a review from a team November 7, 2018 03:15
Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

Neat

@cmonr
Copy link
Contributor

cmonr commented Nov 7, 2018

Out of curiosity, why was the prior logic needed to begin with? Seems like this new behavior is more generic to begin with.

@theotherjimmy
Copy link
Contributor Author

@cmonr I think it was using os.path.join, which does not accept 0 arguments, instead of self._sep.join, which does.

@NirSonnenschein
Copy link
Contributor

/morph build

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 8, 2018

One failure (nothing uploaded to s3, can't locate the exact failure at the moment) - build aborted

@mbed-ci
Copy link

mbed-ci commented Nov 8, 2018

Build : FAILURE

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

@theotherjimmy
Copy link
Contributor Author

The true problem, in case you were wondering:

-I -I. -I./cmsis 

-I without an argument will consume -I., which prevents includes from the root. I'll have to investigate why this is happening.

@cmonr
Copy link
Contributor

cmonr commented Nov 8, 2018

Hmm, would encapsulating the parameters in quotes help, or are you specifically trying to avoid that?

### Description

The prior fix made the assumption that you wanted to compute all of the
parents for a give header file going all the way up the path. This is
not true: you probably want to stop when the project stops. We already
keep track of a virtual name within the project, so instead, we compute
parents of the name, and generate the actual location of these files in
your FS as the path. This makes the solution robust offline and online
(I tested it with my local copy of os.mbed.com)

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Docs update
    [ ] Test update
    [ ] Breaking change
@theotherjimmy
Copy link
Contributor Author

@cmonr Good guess, but that would not help much/at all. The problem was computing parents past the project's root directory. I sorted that with the new commit.

@cmonr cmonr mentioned this pull request Nov 9, 2018
@cmonr
Copy link
Contributor

cmonr commented Nov 9, 2018

Note: This PR is now a part of a rollup PR (#8686).

No further work is needed here, as once that PR is merged, this PR will also be closed and marked as merged.

If any more commits are made in this PR, this PR will remain open and have to go through CI on its own.

@cmonr cmonr merged commit 95e2b07 into ARMmbed:master Nov 9, 2018
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.

5 participants