mirror of
https://github.com/enso-org/enso.git
synced 2024-12-24 15:22:01 +03:00
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:
parent
7eafc5d1a3
commit
207c7af136
@ -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.
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user