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 command line with relative paths #5878

Merged
merged 2 commits into from Jan 23, 2017
Merged

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jan 19, 2017

This fix #5836

@cmaglie cmaglie added Component: IDE The Arduino IDE Type: Regression Something that used to work and now doesn't labels Jan 19, 2017
@cmaglie cmaglie self-assigned this Jan 19, 2017
@mastrolinux mastrolinux added the in progress Work on this item is in progress label Jan 19, 2017
Copy link
Collaborator

@matthijskooijman matthijskooijman left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just tested this with the script that exposed this problem, that also works.

@matthijskooijman
Copy link
Collaborator

@cmaglie, are you also fixing the missing error handling?

@cmaglie
Copy link
Member Author

cmaglie commented Jan 19, 2017

are you also fixing the missing error handling?

Not yet, I didn't looked the internals yet, but from looking at the code that launch the build:

      try {
          [............]
          outputFile = new Compiler(sketch).build(progress -> {}, false);
       } catch (Exception e) {
         // Error during build
         System.exit(1);
       }

it seems that an excpetion is raised also when a compile error occurs (that should not be an exception at all...) and in that case we should not print the exception/stacktrace.
I think that Compiler.build(..) needs to be refactored to not throw exceptions for build errors to properly fix this. I'll leave this change for now.

@matthijskooijman
Copy link
Collaborator

I think that Compiler.build(..) needs to be refactored to not throw exceptions for build errors to properly fix this.

Yeah, probably indeed. Perhaps showing just the exception message and not the stacktrace is a compromise for now? Then at least something is shown on errors, instead of just nothing when some internal exception happens?

@cmaglie
Copy link
Member Author

cmaglie commented Jan 23, 2017

Then at least something is shown on errors, instead of just nothing when some internal exception happens?

I'll cover this in another PR.

@cmaglie cmaglie merged commit 61cccc0 into arduino:master Jan 23, 2017
@mastrolinux mastrolinux removed the in progress Work on this item is in progress label Jan 23, 2017
@cmaglie cmaglie added this to the Release 1.8.2 milestone Jan 23, 2017
@cmaglie cmaglie deleted the cmdlinefix branch January 23, 2017 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE Type: Regression Something that used to work and now doesn't
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--verify with relative filename does not work
4 participants