mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 22:10:15 +03:00
Fix refactor/renameProject with names containing unsupported characters (#10204)
related #10073 Changelog: - fix: rename the project to the name containing unsupported characters
This commit is contained in:
parent
7744e8b464
commit
292d33ccc1
@ -78,12 +78,12 @@ class RenameProjectCmd(
|
|||||||
val context = ctx.executionService.getContext
|
val context = ctx.executionService.getContext
|
||||||
context.renameProject(
|
context.renameProject(
|
||||||
request.namespace,
|
request.namespace,
|
||||||
request.oldName,
|
oldConfig.moduleName,
|
||||||
request.newName
|
newConfig.moduleName
|
||||||
)
|
)
|
||||||
|
|
||||||
ctx.contextManager.getAllContexts.values.foreach { stack =>
|
ctx.contextManager.getAllContexts.values.foreach { stack =>
|
||||||
updateMethodPointers(request.newName, stack)
|
updateMethodPointers(newConfig.moduleName, stack)
|
||||||
clearCache(stack)
|
clearCache(stack)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6230,21 +6230,21 @@ class RuntimeServerTest
|
|||||||
context.executionComplete(contextId)
|
context.executionComplete(contextId)
|
||||||
)
|
)
|
||||||
|
|
||||||
// rename Test -> Foo
|
// rename Test -> My Foo
|
||||||
context.pkg.rename("Foo")
|
context.pkg.rename("My Foo")
|
||||||
context.send(
|
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)
|
val renameProjectResponses = context.receiveN(6)
|
||||||
renameProjectResponses should contain allOf (
|
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),
|
context.Main.Update.mainX(contextId, typeChanged = false),
|
||||||
TestMessages.update(
|
TestMessages.update(
|
||||||
contextId,
|
contextId,
|
||||||
context.Main.idMainY,
|
context.Main.idMainY,
|
||||||
ConstantsGen.INTEGER,
|
ConstantsGen.INTEGER,
|
||||||
Api.MethodCall(
|
Api.MethodCall(
|
||||||
Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo")
|
Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo")
|
||||||
),
|
),
|
||||||
fromCache = false,
|
fromCache = false,
|
||||||
typeChanged = true
|
typeChanged = true
|
||||||
@ -6299,7 +6299,7 @@ class RuntimeServerTest
|
|||||||
context.Main.idMainY,
|
context.Main.idMainY,
|
||||||
ConstantsGen.INTEGER,
|
ConstantsGen.INTEGER,
|
||||||
Api.MethodCall(
|
Api.MethodCall(
|
||||||
Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo")
|
Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo")
|
||||||
),
|
),
|
||||||
fromCache = false,
|
fromCache = false,
|
||||||
typeChanged = false
|
typeChanged = false
|
||||||
@ -6347,21 +6347,21 @@ class RuntimeServerTest
|
|||||||
context.executionComplete(contextId)
|
context.executionComplete(contextId)
|
||||||
)
|
)
|
||||||
|
|
||||||
// rename Test -> Foo
|
// rename Test -> My Foo
|
||||||
context.pkg.rename("Foo")
|
context.pkg.rename("My Foo")
|
||||||
context.send(
|
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)
|
val renameProjectResponses = context.receiveN(6)
|
||||||
renameProjectResponses should contain allOf (
|
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),
|
context.Main.Update.mainX(contextId, typeChanged = false),
|
||||||
TestMessages.update(
|
TestMessages.update(
|
||||||
contextId,
|
contextId,
|
||||||
context.Main.idMainY,
|
context.Main.idMainY,
|
||||||
ConstantsGen.INTEGER,
|
ConstantsGen.INTEGER,
|
||||||
Api.MethodCall(
|
Api.MethodCall(
|
||||||
Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo")
|
Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo")
|
||||||
),
|
),
|
||||||
fromCache = false,
|
fromCache = false,
|
||||||
typeChanged = true
|
typeChanged = true
|
||||||
@ -6401,7 +6401,7 @@ class RuntimeServerTest
|
|||||||
context.Main.idMainY,
|
context.Main.idMainY,
|
||||||
ConstantsGen.INTEGER,
|
ConstantsGen.INTEGER,
|
||||||
Api.MethodCall(
|
Api.MethodCall(
|
||||||
Api.MethodPointer("Enso_Test.Foo.Main", ConstantsGen.NUMBER, "foo")
|
Api.MethodPointer("Enso_Test.MyFoo.Main", ConstantsGen.NUMBER, "foo")
|
||||||
),
|
),
|
||||||
fromCache = true,
|
fromCache = true,
|
||||||
typeChanged = true
|
typeChanged = true
|
||||||
|
Loading…
Reference in New Issue
Block a user