Skip to content

--insert-regions places dividers outside one-line annotated classes #8

Description

@MelbourneDeveloper

With a custom Dart macro returning an empty DmxFragment and a complete DmxGeneratedFile, dmx build seed.dart --insert-regions inserts dividers before a one-line class.

Input:

@dmx('napFlutterSdk')
class NapFlutterSdk {}

Observed:

@dmx('napFlutterSdk')

  //#region

  //#endregion
class NapFlutterSdk {}

The next build fails DMX6002; another --insert-regions duplicates the misplaced dividers. Expected: dividers inside the class and an idempotent second build. Reproduced while integrating NAP with the local CLI based on 65f4223. A multiline seed with explicit interior dividers works. The insertion branch in emit::splice treats all bytes before the closing brace on that line as indentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions