enso icon indicating copy to clipboard operation
enso copied to clipboard

Naming UDC on creation doesn't work without restarting the project

Open AdRiley opened this issue 1 month ago • 7 comments

https://github.com/user-attachments/assets/505f474a-b492-4a3b-a922-27e80acbaf9a

AdRiley avatar Dec 02 '25 09:12 AdRiley

I don't see any request being made from GUI to LS involving refactorings/renameSymbol call. That's the API call that would trigger the actual renaming.

hubertp avatar Dec 09 '25 12:12 hubertp

~~This might be actually related to Ydoc move. Hold your horses for now.~~ nope, looks like GUI never calls backend API, despite some logic being present.

hubertp avatar Dec 09 '25 12:12 hubertp

I don't see any request being made from GUI to LS involving refactorings/renameSymbol call. That's the API call that would trigger the actual renaming.

But is it required to do? As well, a user could just do exactly same text edits, without any call to renameSymbol.

We removed this call some time ago assuming, that code-only change suffices

farmaazon avatar Dec 09 '25 14:12 farmaazon

I noticed that when you create a udc with custom name, the gui first creates a function user_defined_component and then renames it. On the video I create the component, and then press undo two times.

https://github.com/user-attachments/assets/2fa1db4a-37dc-4483-af96-176e766dfd5e

I also checked that creating and renaming separately works as expected, i.e.

  • creating udc with default name works
  • renaming udc works

4e6 avatar Dec 10 '25 15:12 4e6

Also

  • ✔️ renaming through documentation side panel works
  • ❎ renaming through component menu doesn't work

https://github.com/user-attachments/assets/3b22b978-d878-4583-9b67-b3b621182a66

4e6 avatar Dec 10 '25 15:12 4e6

Side issue.

I don't see any output from JsonRpcServer logger in either stdout or the log file, for example https://github.com/enso-org/enso/blob/f5df5a2e7fe0e17ca0182da7c04f58e48f9919b5/lib/scala/json-rpc-server/src/main/scala/org/enso/jsonrpc/JsonRpcServer.scala#L74

4e6 avatar Dec 10 '25 15:12 4e6

Cannot reproduce with the engine test wip/db/14412-rename-by-text-edit when trying to rename function1

from Standard.Base import all

function1 x = x + 1

main =
    operator1 = 41
    operator2 = Main.function1 operator1
    IO.println operator2

4e6 avatar Dec 10 '25 16:12 4e6

Looks like ModuleScope of Main is not being updated with the new function name. Not sure yet why this is not reproducible in the test case.

hubertp avatar Dec 11 '25 11:12 hubertp

Updated the test case. Now it blows up as in the OP case.

hubertp avatar Dec 11 '25 12:12 hubertp

Hubert Plociniczak reports a new STANDUP for the provided date (2025-12-09):

Progress: Investigating UDC problem in #14412 and discovering that GUI does not use the provided support. Investigating remote logging problems (potentially part of #14259). Debugging release problems with Mac. It should be finished by 2025-12-11.

Next Day: Next day I will be working on the #10525 task. Continue working on visualizations

enso-bot[bot] avatar Dec 14 '25 22:12 enso-bot[bot]

Hubert Plociniczak reports a new STANDUP for the provided date (2025-12-10):

Progress: Fixed some logging issues introduced during project-manager refactoring (now log levels are respected and duplicate logs should not happen). Testing headless hybrid logging. Investigating UDC issue which apparently should be working despite GUI workarounds. It should be finished by 2025-12-11.

Next Day: Next day I will be working on the #10525 task. Continued working on the issues

enso-bot[bot] avatar Dec 14 '25 22:12 enso-bot[bot]

Hubert Plociniczak reports a new STANDUP for the provided date (2025-12-11):

Progress: Found and provided a fix UDCs/self-argument caching issue. Testing the workaround as it messes with dataflow analysis and has potentially wide ranging consequences for cache invalidation. Merged logging fix. Reviewing ongoing peers PRs. It should be finished by 2025-12-11.

Next Day: Next day I will be working on the #10525 task. Continued working on visualizations.

enso-bot[bot] avatar Dec 14 '25 22:12 enso-bot[bot]