Skip to content

Errors with Import when items are in the wrong path #291

Closed

Description

@eduard93

Consider the following situation: user commits an xml into class mapping directory and this xml contains classes and:

  • EnsExportProduction
  • Ens.Config.DefaultSettings.ESD
  • EnsExportNotes

That causes these three items to be returned from ListItemsInFiles call in ImportRoutines (since ListItemsInFiles loads everything in the mapping directory without compiling and returns a full list of items, including these three items in our xml export).

But then in ImportRoutines we iterate this local of items and call ImportItem which tries to load the item from a correct place - which causes the error as the item does not exist in the right place.

Instead of an error, it should be reported as a warning.

Activity

  1. self-assigned this
    on Oct 24, 2023
  2. added
    bugSomething isn't working
    customerBased on customer feedback (as opposed to something identified by developers)
    on Oct 24, 2023
  3. removed their assignment
    on Oct 22, 2024
  4. cambot commented on Apr 24, 2025

    @cambot
    Contributor

    I think I just encountered this as well. I'm running v2.10.0

    I had a lookup table that shifted spots in the repository. the internal reference pointed to a file that no longer exists. (I can't remember if I did this manually or the module ended up in this state, but I know I was modifying the export paths experimenting to find a folder structure I liked.)

    Here is the exception I get:

    Image

    SourceControl.Git.Utils.ImportItem() gets the date the file was modified. However, on my Windows system, ##class(%File).GetFileDateModified(filename) returns -2 when the file does not exist, which is what I see in the data global:

    Image

    GetTempFileAndRoutineTS() does not check the value before running $zdt(). I agree that the hooks should more gracefully catch/report this error instead of throwing an exception.

  5. self-assigned this
    on Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

customerBased on customer feedback (as opposed to something identified by developers)

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions