-
-
Notifications
You must be signed in to change notification settings - Fork 515
ATL-972: Moved the ./theia/launch.json config into a temp folder.
#168
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
Conversation
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it out with my Zero, standalone CMSIS-DAP probe, and J-Link and it works fine, but the "No Configurations" experience is really not pleasant. It seems to me that we're trading the very minor annoyance of the .theia folder pollution of the sketch for a significantly worse user experience. My suggestion is to wait until a solution is found that can avoid the "No Configuration" thing from happening.
Thank you for the review, Per.
but the "No Configurations" experience is really not pleasant. It seems to me that we're trading the very minor annoyance of the
.theiafolder pollution of the sketch for a significantly worse user experience.
This is a bit more complex. Let assume we keep the .theia folder in the sketch folder, and we perform the following steps:
- Create a new sketch. A sketch will be created in the temp folder. Let's say it's under
~/temp/x. - Compile the new sketch. The compiled output will be under another temp folder:
~/temp/arduino-sketch-y. - Start debug. (As discussed, we keep the
.theiafolder inside the sketch folder.) A file will be created under~/temp/x/.theia/launch.json, and theexecutablepath inside thelaunch.jsonwill point to~/temp/arduino-sketch-y/board:fqbn/x.ino.elf. - Save the sketch and pick a folder somewhere, let's say
~/Documents/Arduino/x; here, it gets tricky. We could copy~/temp/x/.theia/launch.jsonto~/Documents/Arduino/x/.theia/launch.json, but theexecutableentry inside thelaunch.jsonstill points to~/temp/arduino-sketch-y/board:fqbn/x.ino.elf. This can be invalid, and this is the issue here, not that we keep the./theiafolder inside the sketch folder or not.
I hope this clarifies. If no, let me know.
My suggestion is to wait until a solution is found that can avoid the "No Configuration" thing from happening.
For the record; this is how it works now from the main, so technically, we do not change the UX at all.
@ubidefeo
ubidefeo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for explaining the case in which we would move the sketch and pre-existing config would have the wrong path.
I think how it is working now is good enough.
We'll investigate the debugger experience further down the road, especially since we'll have to find a more Arduino way of adding custom parameters via debug_custom.json.
This PR has therefore my approval.
Thank you @per1234 for your review 👍🏼
What it does:
sketch_folder/.theia/launch.jsonand moves it to a temp folder.Steps to reproduce:
Arduino. You can open the config file in an editor. Hover over the editor tab oflaunch.json; it will point to some temp folder (arduino-ide2-).Arduinoconfig is missing from the debug view! We need a solution for this in the future.)Arduinodebug config in the Debug view, and you can start the debug session from there.