Skip to content

Project nav-marker-rules will typically not be used on activation #20

@johnarwe

Description

@johnarwe

Once the initial display issue described by #19 is fixed, another problem will become apparent: currently nav-view and nav-parser each refer to the other, but nav-parser may be incompletely initialized at the point when nav-view would build the panel (even if nav-view doing so for an already-open file was triggered using a atom.workspace.observeTextEditors event... I've tested it). Nav-parser's constructor calls getProjectRules, but that requires I/O when project-level rules file(s) are present; the I/O will always be asynch, and may (in the general, and already tested, cases) finish after events like observeTextEditors have fired. In order to truly fix the race, any existing panels must be removed (and the active one rebuilt) when the I/Os complete.

I am building a pull request to split nav-parser's initialization (for clarity mostly), and to destroy/rebuild all the panels whenever a project rules file read operation completes. I've tested the flow and it does fix the problem, but separating the code for each of the problems into distinct pull requests will require a bit more time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions