Block FQN substitution in drop downs (#9569)

While blocked FQN substitution when creating/editing node, the drop-downs still used it, and it does not work.

This amends that + added a reference to a task where we want to fix the original issue.
This commit is contained in:
Adam Obuchowicz 2024-03-28 15:11:20 +01:00 committed by GitHub
parent 7eafc5d1a3
commit 207c7af136
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -236,8 +236,11 @@ function resolveTagExpression(edit: Ast.MutableModule, tag: ExpressionTag) {
if (tag.requiredImports) {
const conflicts = graph.addMissingImports(edit, tag.requiredImports)
if (conflicts != null && conflicts.length > 0) {
// Is there is a conflict, it would be a single one, because we only ask about a single entry.
return conflicts[0]?.fullyQualified!
// TODO: Substitution does not work, because we interpret imports wrongly. To be fixed in
// https://github.com/enso-org/enso/issues/9356
// And here it was wrong anyway: we should replace only conflicting name, not entire expression!
// // Is there is a conflict, it would be a single one, because we only ask about a single entry.
// return conflicts[0]?.fullyQualified!
}
}
// Unless a conflict occurs, we use the selected expression as is.

View File

@ -284,7 +284,8 @@ export const useGraphStore = defineStore('graph', () => {
rhs.setNodeMetadata(metadata)
const assignment = Ast.Assignment.new(edit, ident, rhs)
for (const _conflict of conflicts) {
// TODO: Sort out issues with FQN with the engine.
// TODO: Substitution does not work, because we interpret imports wrongly. To be fixed in
// https://github.com/enso-org/enso/issues/9356
// substituteQualifiedName(edit, assignment, conflict.pattern, conflict.fullyQualified)
}
const id = asNodeId(rhs.id)
@ -378,7 +379,8 @@ export const useGraphStore = defineStore('graph', () => {
return
}
for (const _conflict of conflicts) {
// TODO: Sort out issues with FQN with the engine.
// TODO: Substitution does not work, because we interpret imports wrongly. To be fixed in
// https://github.com/enso-org/enso/issues/9356
// substituteQualifiedName(edit, wholeAssignment, conflict.pattern, conflict.fullyQualified)
}
}