Skip to content

self-cycle not reported through the tool #212

Closed

Description

@bsansouci

When a module references itself, nothing shows up until you get a notification in vscode that the server has crashed.
Looking at my terminal, I saw the error message FAILED: MyAwesomeModule has a self cycle

Activity

  1. cristianoc commented on Apr 30, 2021

    @cristianoc
    Collaborator

    That's intriguing. Example?

  2. cristianoc commented on May 4, 2021

    @cristianoc
    Collaborator

    To be re-opened with an example.

  3. bsansouci commented on May 5, 2021

    @bsansouci
    ContributorAuthor

    Example! Add a file A.res in your codebase, in it put:

    let a = 10
    
    Js.log(a)

    Everything typechecks and builds, now change it to

    let a = 10
    
    Js.log(A.a)

    The server crashes and you get a popup that says "Wanna start the server", you do it 5 times and then it says it crashed 5 times. It never reports that the error is that there's a cycle, but that error gets reported if you manually run bsb.

  4. cristianoc commented on May 5, 2021

    @cristianoc
    Collaborator

    Same as this:
    #220

    Though there's the comment about crashing, too.

  5. cristianoc commented on May 5, 2021

    @cristianoc
    Collaborator

    I suspect it fails when parsing this:

    #Start(1620252447923)
    FAILED: A has a self cycle
    #Done(1620252448018)
    
  6. cristianoc commented on May 5, 2021

    @cristianoc
    Collaborator
  7. added
    bug
    on May 5, 2021
  8. added a commit that references this issue on May 8, 2021
  9. cristianoc commented on Jul 22, 2021

    @cristianoc
    Collaborator

    Can repro the crashing too.

  10. cristianoc commented on Jan 19, 2022

    @cristianoc
    Collaborator

    Just revisited this. For context: self-cycle error goes to compiler.log, but cycle of size 2 or more the log is empty. Cannot be solved in the editor without a compiler fix.

  11. cristianoc commented on Jan 20, 2022

    @cristianoc
    Collaborator
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions