Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop if no target #484

Closed
boozook opened this issue Nov 3, 2016 · 3 comments
Closed

Infinite loop if no target #484

boozook opened this issue Nov 3, 2016 · 3 comments
Labels

Comments

@boozook
Copy link

boozook commented Nov 3, 2016

I got the infinite loop of calls isEligible method for all build-providers. It happens if I have no any .atom-build.*-file;

For localise & reproduce this issue I was create a new atom-plugin with empty provider contains isEligible() { console.debug("LOOP HERE"); return false; }

atom-build loop issue mov opt

Steps for reproduce:

  1. Open any/new project;
  2. Call build:select-active-target (press F7 by default)
@boozook
Copy link
Author

boozook commented Nov 3, 2016

Loop is here.

@noseglid noseglid added the bug label Nov 7, 2016
@noseglid
Copy link
Owner

noseglid commented Nov 7, 2016

This should be fixed. Thanks for report.

As a workaround it seems as if you add a .atom-build.yml with a single target it it shouldn't occur. This helps you work with the package until this is fixed.

sphaerophoria added a commit to sphaerophoria/atom-build that referenced this issue Feb 27, 2017
In TargetManager, getTargets, and by extension fillTargets, has an
implicit requirement that pathTarget.targets is not empty. If it is we
re-call refreshTargets which would end up with infinite recursion. The
fix is to pre-emptively check before the fillTargets call
sphaerophoria added a commit to sphaerophoria/atom-build that referenced this issue Feb 27, 2017
In TargetManager, getTargets, and by extension fillTargets, has an
implicit requirement that pathTarget.targets is not empty. If it is we
re-call refreshTargets which would end up with infinite recursion. We
don't actually need to call fillTargets as we already know which targets
are available, we can just set them ourselves
sphaerophoria added a commit to sphaerophoria/atom-build that referenced this issue Feb 27, 2017
In TargetManager, getTargets, and by extension fillTargets, has an
implicit requirement that pathTarget.targets is not empty. If it is we
re-call refreshTargets which would end up with infinite recursion. We
have enough information to retrace the steps fillTargets currently takes so
we can just set them ourselves
noseglid added a commit that referenced this issue May 22, 2017
Thanks to @sphaerophoria for correctly identifying the issue
and providing an initial solution in #503.

Fixes: #484, #447
noseglid added a commit that referenced this issue May 22, 2017
Thanks to @sphaerophoria for correctly identifying the issue
and providing an initial solution in #503.

Fixes: #484, #447
@boozook
Copy link
Author

boozook commented May 23, 2017

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants