diff --git a/engine/runtime-instrument-common/src/main/scala/org/enso/interpreter/instrument/command/RenameProjectCmd.scala b/engine/runtime-instrument-common/src/main/scala/org/enso/interpreter/instrument/command/RenameProjectCmd.scala index 9aabb0525b..be2eeb09ac 100644 --- a/engine/runtime-instrument-common/src/main/scala/org/enso/interpreter/instrument/command/RenameProjectCmd.scala +++ b/engine/runtime-instrument-common/src/main/scala/org/enso/interpreter/instrument/command/RenameProjectCmd.scala @@ -78,12 +78,12 @@ class RenameProjectCmd( val context = ctx.executionService.getContext context.renameProject( request.namespace, - request.oldName, - request.newName + oldConfig.moduleName, + newConfig.moduleName ) ctx.contextManager.getAllContexts.values.foreach { stack => - updateMethodPointers(request.newName, stack) + updateMethodPointers(newConfig.moduleName, stack) clearCache(stack) } diff --git a/engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/instrument/RuntimeServerTest.scala b/engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/instrument/RuntimeServerTest.scala index d1631f99d6..32aeb26976 100644 --- a/engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/instrument/RuntimeServerTest.scala +++ b/engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/instrument/RuntimeServerTest.scala @@ -6230,21 +6230,21 @@ class RuntimeServerTest context.executionComplete(contextId) ) - // rename Test -> Foo - context.pkg.rename("Foo") + // rename Test -> My Foo + context.pkg.rename("My Foo") context.send( - Api.Request(requestId, Api.RenameProject("Enso_Test", "Test", "Foo")) + Api.Request(requestId, Api.RenameProject("Enso_Test", "Test", "My Foo")) ) val renameProjectResponses = context.receiveN(6) renameProjectResponses should contain allOf ( - Api.Response(requestId, Api.ProjectRenamed("Test", "Foo", "Foo")), + Api.Response(requestId, Api.ProjectRenamed("Test", "MyFoo", "My Foo")), context.Main.Update.mainX(contextId, typeChanged = false), TestMessages.update( contextId, context.Main.idMainY, ConstantsGen.INTEGER, Api.MethodCall( - Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo") + Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo") ), fromCache = false, typeChanged = true @@ -6299,7 +6299,7 @@ class RuntimeServerTest context.Main.idMainY, ConstantsGen.INTEGER, Api.MethodCall( - Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo") + Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo") ), fromCache = false, typeChanged = false @@ -6347,21 +6347,21 @@ class RuntimeServerTest context.executionComplete(contextId) ) - // rename Test -> Foo - context.pkg.rename("Foo") + // rename Test -> My Foo + context.pkg.rename("My Foo") context.send( - Api.Request(requestId, Api.RenameProject("Enso_Test", "Test", "Foo")) + Api.Request(requestId, Api.RenameProject("Enso_Test", "Test", "My Foo")) ) val renameProjectResponses = context.receiveN(6) renameProjectResponses should contain allOf ( - Api.Response(requestId, Api.ProjectRenamed("Test", "Foo", "Foo")), + Api.Response(requestId, Api.ProjectRenamed("Test", "MyFoo", "My Foo")), context.Main.Update.mainX(contextId, typeChanged = false), TestMessages.update( contextId, context.Main.idMainY, ConstantsGen.INTEGER, Api.MethodCall( - Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo") + Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo") ), fromCache = false, typeChanged = true @@ -6401,7 +6401,7 @@ class RuntimeServerTest context.Main.idMainY, ConstantsGen.INTEGER, Api.MethodCall( - Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo") + Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo") ), fromCache = true, typeChanged = true