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

Fix issue with unrecognized uvision file types #3114

Merged
merged 1 commit into from
Nov 29, 2016

Conversation

sarahmarshy
Copy link
Contributor

Description

Fixes #3010. Does not add them to accepted file types, but instead does not fail. Header files will show up in the project tree as children of the files that depend on them.

Status

READY

@nuket @sg- @theotherjimmy

@sarahmarshy
Copy link
Contributor Author

/morph export-build

@mbed-bot
Copy link

Result: SUCCESS

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

/morph export-build

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 24, 2016

Is this desirable? Not showing header files? I am aware they are not required for project to be built. but I find them vital during the development within IDE. I would keep them in.

As your commit message says, they are visible as dependency, but this is true just for uvision. A unified view would be to have them in project or not at all.

@sarahmarshy
Copy link
Contributor Author

This is just for uvision, so they will still show up.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2016

This is just for uvision, so they will still show up.

It should be consistent across tools, thus I would vote to keep header files in IDE. It's different, to know which files includes the header I want to open versus find the header in the workspace view. If we remove header files, should be done for all tools. But then again as it was pointed out in one issue, if in eclipse for instance the header file is not present, their highlighter or whatever they call it does not know what macros are defined and can't highlight properly the code that is "active".

To fix that unsupported issue reported, we add the most common extensions. I can think of having .h, `.hpp``. We could argue about linker file as well, that it is usually defined in the project itself, but good to have for viewing in the workspace view.

I would propose to extend to support header files with .hpp, possibly .hh as well?

Update: our tools recognize .h and .hpp, our tools should also:

        elif ext == '.h' or ext == '.hpp':
            resources.headers.append(file_path)

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Removing .h files - -1, but that refactoring and renaming +1

@sarahmarshy
Copy link
Contributor Author

It won't remove the .h files. It actually ends up looking nicer, because they show up as an expandable list under the file that depends on them. Go ahead and give export to uvision a shot. You'll still see them and be able to edit them in your project!

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2016

This is my workspace, show include dependencies is enabled :
uvision_workspace
I have installed 5.17 currently. I'll need to update to the latest 5.21 or above soon, so can try that one. There are also empty folders.

My view still standing, I would keep headers in the tree. This list of dependencies can be used anyway.

@sg-
Copy link
Contributor

sg- commented Nov 3, 2016

@sarahmarshy will plan to merge #3010 but want changes for validation and not exposing the traceback. Will you rebase and keep the .h and .hpp for consistency across IDEs once merged. Sorry for flip flopping on this. Didnt realize other IDEs didn't use nested headers in the navigation tree

@sarahmarshy
Copy link
Contributor Author

@sg- I made the necessary changes now, but I will wait for #3010

@sg-
Copy link
Contributor

sg- commented Nov 10, 2016

/morph export-build

@mbed-bot
Copy link

Result: FAILURE

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

/morph export-build

Output

mbed Build Number: 19

Exporter Build failed!

@theotherjimmy
Copy link
Contributor

Those failures are fixed by this PR #3243

@theotherjimmy
Copy link
Contributor

Failures unrelated. LGTM

@sg-
Copy link
Contributor

sg- commented Nov 10, 2016

Lets get that in first then.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 16, 2016

/morph export-build

@bridadan
Copy link
Contributor

Apologies for the not updated GitHub status, the CI server's power cord got nudged today and messed up the statuses. If you follow the details link though you can see everything passed! So LGTM

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