Skip to content

Extract api is messing up the structure of an enum #9340

Description

@RohitPtnkr1996

In a recent change I made in the PR #9338, I noticed when running the rush extract-api script that the enum I had updated got totally messed up.
It seems the script sorts the enum values alphabetically while still maintaining the order of the comments which results in mismatched comments.

Updated enum in ts file:

export enum DbResponseStatus {
  ...
  NotOpen = 7,  /* iModel is not open. */
  Error = 100, /*  generic error*/
  Error_ECSql_PreparedFailed = Error + 1, /*  ecsql prepared failed*/
  Error_ECSql_StepFailed = Error + 2, /*  ecsql step failed*/
  ...
}

rush extract-api result:

export enum DbResponseStatus {
    ...
    Error_ECSql_PreparedFailed = 101,/* iModel is not open. */
    // (undocumented)
    Error_ECSql_RowToJsonFailed = 103,/*  generic error*/
    // (undocumented)
    Error_ECSql_StepFailed = 102,/*  ecsql prepared failed*/
    // (undocumented)
    NotOpen = 7,/*  ecsql step failed*/
    ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildologyIssues related to process, tooling or CI/CD pipelines

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions