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

Avoid duplicated serial plotter builds #1174

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
francescospissu merged 3 commits into main from fspissu/avoid-twice-serial-plotter-app
Jul 13, 2022

Conversation

Copy link
Contributor

@francescospissu francescospissu commented Jul 12, 2022

Motivation

IDE2 contains two serial plotter apps, one in the build directory and the other in node_modules/arduino-ide-extension/build.

Change description

Do not copy the app into the build folder.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project labels Jul 12, 2022
@kittaakos kittaakos self-requested a review July 12, 2022 12:38
Comment on lines 17 to 18
'build',
'..',
'node_modules',
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't test this, but are you sure this works for the bundled version of the app as well? they have different file locations, I think we cannot include from the node_modules this way...

Copy link
Contributor Author

@francescospissu francescospissu Jul 12, 2022
edited
Loading

Choose a reason for hiding this comment

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

No, it doesn't work. It just works locally. I'm reverting it.

Copy link
Contributor

@kittaakos kittaakos Jul 13, 2022
edited
Loading

Choose a reason for hiding this comment

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

Let Node.js find the plotter app: require.resolve.

See the working example here: fspissu/avoid-twice-serial-plotter-app...kittaakos:avoid-twice-serial-plotter-app-2.

The bundled electron app contains the plotter only once:
Screen Shot 2022年07月13日 at 09 07 56

francescospissu reacted with thumbs up emoji
Copy link
Contributor Author

@francescospissu francescospissu Jul 13, 2022

Choose a reason for hiding this comment

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

I was already investigating to do it in this way. Thanks for the hint @kittaakos 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

nice implementation, using the resolve to leverage how node looks for packages is quite clever!

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Co-authored-by: Akos Kitta <a.kitta@arduino.cc>
@francescospissu francescospissu marked this pull request as ready for review July 13, 2022 10:42
@fstasi fstasi self-requested a review July 13, 2022 13:44
Copy link
Contributor

@fstasi fstasi left a comment

Choose a reason for hiding this comment

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

lgtm

francescospissu reacted with thumbs up emoji
@francescospissu francescospissu deleted the fspissu/avoid-twice-serial-plotter-app branch July 13, 2022 15:20
@AlbyIanna AlbyIanna changed the title (削除) Avoid twice serial plotter apps (削除ここまで) (追記) Avoid duplicated serial plotter builds (追記ここまで) Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@kittaakos kittaakos Awaiting requested review from kittaakos

1 more reviewer

@fstasi fstasi fstasi approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

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