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

chore(deps): update to [email protected] #2211

Merged
merged 5 commits into from
Sep 29, 2023
Merged

chore(deps): update to [email protected] #2211

merged 5 commits into from
Sep 29, 2023

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Sep 1, 2023

Depends on #2199

Motivation

Use the latest Theia (1.41.0) dependencies in IDE2.

Change description

Other information

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)

@kittaakos kittaakos added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Sep 1, 2023
@kittaakos kittaakos self-assigned this Sep 1, 2023
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

I think the language pack extensions should be bumped to 1.80.0 per eclipse-theia/theia@8f64a58

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

UPDATE: Fixed by c75d2b6

Unexpected introduction of "New Text File" menu item.

To reproduce

  1. Open the File menu.
    🐛 There is an unexpected "New Text File" menu item
  2. Select "New Text File" from the menu.
    🐛 A new editor tab appears that is read-only and thus

Expected behavior

The File menu does not contain a "New Text File" menu item.

I think the established "New Tab" system available from the editor toolbar context menu is already sufficient for users to add additional files to their sketch so the added "New Text File" menu item would be superfluous even if it did function for adding files to the sketch.

Arduino IDE version

9d02809 (tester build for 2071ab8

Operating system

Windows 11

Additional context

I believe it was introduced by eclipse-theia/theia@de2e7e1

@kittaakos
Copy link
Contributor Author

Thanks a lot for giving it a try 🙏

the language pack extensions should be bumped to 1.80.0

b2d7bd5

The File menu does not contain a "New Text File" menu item.

c75d2b6

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

File path no longer shown in editor tab tooltip

Previously, the path of the file was shown in a tooltip (maybe the term for the content is "label"?) when the mouse pointer was hovered over the editor tab.

Although not terribly valuable if you only consider the tabs of files from the sketch root, this feature was very useful when files from other locations were opened in the editor. This commonly occurs when using the "Go to Definition" feature, which might open editor tabs for files in obscure locations such as the platform core and platform bundled libraries.

To reproduce

  1. Select File > Examples > 01.Basics > Blink from the Arduino IDE menus.
  2. Select Tools > Board > Arduino AVR Boards > Arduino Uno from the Arduino IDE menus.
  3. Right click on the pinMode call in the editor.
  4. Select "Go to Definition" from the context menu.
    A "wiring_digital.c" editor tab opens.
  5. Hover the mouse pointer over the editor tab.

🐛 A tooltip showing the path of wiring_digital.c does not appear.

Expected behavior

Tooltip showing path appears when an editor tab is hovered.

Arduino IDE version

b86675f (tester build for c75d2b6)

Operating system

Windows 11

Additional context

The fault does not occur when I use Arduino IDE 2.2.1:

image

The fault does not occur when I use Theia Blueprint version 1.41.0:

image

@kittaakos
Copy link
Contributor Author

kittaakos commented Sep 14, 2023

Tooltip showing path appears when an editor tab is hovered.

Thank you! d4b6a0d should fix it.

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

UPDATE: Resolved by 368ea63

Exception not printed to log when save fails

Arduino IDE is to save the sketch if the file attributes were. Previously an exception would be printed to the logs.

🐛 No indication or information about the failure is logged when saving fails due to the sketch having read-only file attributes.

To reproduce

  1. Set the read-only file attribute on a sketch.
  2. Open the sketch in Arduino IDE.
  3. Make a change to the sketch contents.
  4. Select File > Save from the Arduino IDE menus.
    The dirty indicator remaining on the modified sketch file tab indicates the save attempt failed (failure is otherwise not indicated by the Arduino IDE UI: Saving sketch fails silently when files are read-only #1501).

🐛 There is no indication or information about the failure in the logs.

Expected behavior

Some useful information about the failure is logged when saving fails due to the sketch having read-only file attributes.

This is the exception logged by Arduino IDE 2.2.1:

2023-09-15T06:47:06.522Z root ERROR Error: Unable to write file 'ReadOnly.ino' (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, open 'c:\Users\per\Documents\Arduino\ReadOnly\ReadOnly.ino')
    at x.asFileOperationError (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3656405)
    at x.rethrowAsFileOperationError (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3656337)
    at x.writeFile (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3654063)
    at async x.write (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3651260)
    at async d.doWrite (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3636421)
Caused by: Error: Request 'writeFile' failed
    at Proxy.<anonymous> (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3031719)
    at b.writeFile (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3740783)
    at x.doWriteUnbufferedQueued (file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3666184)
    at file:///C:/arduino-tools/221-2.2.1/resources/app/lib/frontend/bundle.js:2:3665870
Caused by: NoPermissions (FileSystemError): Error: EPERM: operation not permitted, open 'c:\Users\per\Documents\Arduino\ReadOnly\ReadOnly.ino'
    at u (C:\arduino-tools\221-2.2.1\resources\app\lib\backend\main.js:2:1324559)
    at T.toFileSystemProviderError (C:\arduino-tools\221-2.2.1\resources\app\lib\backend\main.js:2:1348461)
    at T.open (C:\arduino-tools\221-2.2.1\resources\app\lib\backend\main.js:2:1341857)
    at async T.writeFile (C:\arduino-tools\221-2.2.1\resources\app\lib\backend\main.js:2:1341341)
    at async g.onRequest (C:\arduino-tools\221-2.2.1\resources\app\lib\backend\main.js:2:1083037)
    at async c.handleRequest (C:\arduino-tools\221-2.2.1\resources\app\lib\backend\main.js:2:1073930)

Arduino IDE version

7a157e4 (tester build for d4b6a0d)

Operating system

Windows 11

Additional context

I do still see a logged exception when saving fails due to there being a share access file write lock on the sketch.

Base automatically changed from update-infra to main September 26, 2023 08:06
@kittaakos
Copy link
Contributor Author

Expected behavior

Some useful information about the failure is logged when saving fails due to the sketch having read-only file attributes.

Fixed in 368ea63. This will close #1501.

editor-readonly.mp4

@kittaakos kittaakos marked this pull request as ready for review September 29, 2023 08:45
@per1234 per1234 linked an issue Sep 29, 2023 that may be closed by this pull request
3 tasks
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

Thanks Akos!

@kittaakos kittaakos merged commit 8f4bcc8 into main Sep 29, 2023
26 checks passed
@kittaakos kittaakos deleted the theia-1.41.0 branch September 29, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving sketch fails silently when files are read-only
2 participants