Skip to content

Automatically alphabetizing barrels introduces circular dependencies in some cases #1282

Closed

Description

@Blasz
Version
$ ng --version
(node:11205) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.6
node: 6.2.1
os: linux x64
Repro steps
  1. Structure components in a shared folder where certain ordering in the barrel is necessary - http://plnkr.co/edit/vDsAp8dzqBVsl7C1G8Q7?p=preview

  2. Generate a new module in the same shared folder

    app/ $ ng generate pipe shared/something
    
  3. Angular-CLI re-orders the shared barrel file alphabetically and causes circular dependency issues

Related to angular/angular#9334 and introduced in #582

I'm not sure what the best way around this is but I think it involves a higher level discussion where, when and how barrels should be used.

Activity

  1. filipesilva commented on Jul 28, 2016

    @filipesilva
    Contributor

    Closed as obsolete following #1455.

  2. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  3. locked and limited conversation to collaborators on Sep 6, 2019
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