Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor Init process to use new CLI gRPC API #342

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

Closed
silvanocerza wants to merge 6 commits into main from scerza/new-init-process

Conversation

Copy link
Contributor

@silvanocerza silvanocerza commented Apr 27, 2021

The CLI initialization process has been changed in significant ways with PR arduino/arduino-cli#1274, it needs to be thorougly tested before merging to avoid breaking the IDE.

@silvanocerza silvanocerza requested a review from a team April 27, 2021 16:04
@@ -26,6 +26,7 @@ export class CoreServiceImpl extends CoreClientAware implements CoreService {
const { sketchUri, fqbn, compilerWarnings } = options;
const sketchPath = FileUri.fsPath(sketchUri);

await this.coreClientProvider.initialized;
Copy link
Contributor

Choose a reason for hiding this comment

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

@silvanocerza what happens if the initialized fails or rejects? is it ok to proceed calling coreClient()?

Copy link
Contributor Author

@silvanocerza silvanocerza May 4, 2021

Choose a reason for hiding this comment

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

I think it's fine, if the Init gRPC function fails it means it has been called, so Create was successful meaning we have an internal instance in the CLI daemon and we have a "working" client.

If Init fails completely though we must have some other huge problems, with the refactoring failure to load a platform or library just logs an error, but it doesn't stop completely.

I still don't like how I implemented this though, I'd like to show the user a notification when there are this kind of failures but am not sure how to handle that.

@silvanocerza silvanocerza force-pushed the scerza/new-init-process branch 2 times, most recently from e6e139d to f73f321 Compare May 13, 2021 09:57
Copy link

@silvanocerza
Installing a platform rebuilds the tools>board menu, but uninstalling does not

  • install a platform
  • look at the boards menu: it's there
  • uninstall the platform
  • look at the boards menu: it's still there

image

Copy link
Contributor Author

@ubidefeo I investigated a bit, the same issue is also present when uninstalling a library.

It seems to me this is a race condition, the list of boards divided by platform is retrieved before the platform is uninstalled, the strange thing though is that after installing a new one I'd expect it to stop showing the uninstalled platform but it doesn't. 🤔

This requires some further investigation I guess.

Copy link
Contributor Author

silvanocerza commented Jun 15, 2021
edited
Loading

Rebased to fix conflicts and trigger a new build after updating the version of the Arduino CLI.
The issues with core/platforms uninstallation is solved, it was an issue in the CLI after all.

@fstasi fstasi force-pushed the scerza/new-init-process branch from be4546b to 178a11d Compare June 16, 2021 06:41
Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

been poking around for almost an hour and haven't found anything which isn't already an issue in the Beta 7.
LGTM

Copy link
Contributor Author

This has been superseded by #506. Closing.

@silvanocerza silvanocerza deleted the scerza/new-init-process branch October 13, 2021 08:06
@per1234 per1234 added conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: enhancement Proposed improvement labels Oct 13, 2021
@per1234 per1234 added the topic: CLI Related to Arduino CLI label Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ubidefeo ubidefeo ubidefeo approved these changes

+1 more reviewer

@fstasi fstasi fstasi left review comments

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
conclusion: duplicate Has already been submitted topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /