Mapping filters: export and pull disagree on package boundaries, so a pulled deletion can't remove the class
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend
Línea de trabajo
Read the export and reverse mapping logic in Utils.cls around lines 2637 and 2795, then trace how IncrementalLoad.cls handles deletions around line 48. Compare how both paths interpret filters with and without a trailing dot, and reproduce the reported pull deletion. Done means export and reverse mapping agree on package boundaries and a pulled deletion removes the matching class without over-matching neighboring package names.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Utils.Name() (export) and Utils.NameToInternalName() (reverse mapping, used when a pulled change deletes a file) treat a mapping filter differently:
Name()matches the filter as a plain name prefix:
Utils.cls#L2637
if ($extract(nam,1,$length(p))=p) && ...NameToInternalName()treats the filter as a package name and appends the.itself:
Utils.cls#L2795
$extract($translate(nam, "/", "."), 1, ($length(coverage)+1)) = (coverage_".")
No filter works in both directions:
- With a trailing dot (
MyApp., the only way to make export respect the package boundary), the reverse mapping compares againstMyApp.., which never matches. A pulled deletion gets no internal name, andIncrementalLoadprints "was not in the database. Nothing to delete." (IncrementalLoad.cls#L48), while the class stays in IRIS. - Without it (
MyApp,MyApp.Test), deletions map correctly. But export over-matches:MyApp.TestData.Foois exported under theMyApp.Testmapping, andMyAppOther.FoounderMyApp. Deleting either on a pull then fails the same way, since the reverse mapping (correctly) doesn't treat them as members of those packages.
Loading isn't affected, because it reads the class name from the file. Only deletions, where the file is gone, depend on the reverse mapping.
Steps to reproduce
- Mappings: CLS
MyApp.→cls/, CLSMyApp.Test.→test/. Pull event handler: the default (Incremental Load). - Create and compile
MyApp.Foo; it's exported tocls/MyApp/Foo.cls. Commit and push. - Delete
cls/MyApp/Foo.clson the remote (in another clone or the web UI), and push. - In IRIS, pull from the Git menu.
Expected: MyApp.Foo is deleted from IRIS.
Actual: cls/MyApp/Foo.cls was not in the database. Nothing to delete., and MyApp.Foo remains.
Environment
git-source-control 2.17.1 on IRIS 2026.3 (preview build). Also verified against main at dfd8441 (2.18.0) (the offending code is the same).
Suggested fix
Make both directions use the same rule. For example, either:
- treat a filter as a package name in
Name()too: match when the name equals the filter or starts with filter +.; or - in
NameToInternalName(), don't append a.when the filter already ends with one.
Normalising a trailing dot in the filter when settings are saved would also cover existing configurations. Other item types that use the same matching (MAC, INC) may have the same issue; we've only tested CLS.
Workaround
We use filters without the dot (MyApp, MyApp.Test) and forbid names that would over-match: nothing directly under MyApp starting with Test other than the MyApp.Test package, and no package starting with MyApp other than MyApp itself. This isn't a very strong check, though, since it relies solely on the honor system.
- Lenguaje dominante
- ObjectScript
- Estrellas
- 22
- Forks
- 15
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de intersystems/git-source-control
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
intersystems/git-source-control#1015 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
intersystems/git-source-control#1013 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
intersystems/git-source-control#1012 ·
Todos los issues de intersystems/git-source-control
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
aws-documentation-mcp-server: empty spanning headers shift table column labelsPosiblemente ocupada @pradeep-ramola la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
bug untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
opensearch-project/sql#5990 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
GustavoBaranda/chatflow-agent#238 ·
Los mantenedores suelen responder en 1 día