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

Bsb build order is seemingly non-deterministic (wrong-deterministic?) #1264

Closed
glennsl opened this issue Feb 24, 2017 · 6 comments
Closed

Bsb build order is seemingly non-deterministic (wrong-deterministic?) #1264

glennsl opened this issue Feb 24, 2017 · 6 comments

Comments

@glennsl
Copy link
Contributor

glennsl commented Feb 24, 2017

When doing a refactor that spans multiple files, bsb doesn't "stick" to reporting errors in the file you are currently working on. This leads to having to jump back and forth between different files to make one error fix attempt per file at a time, which then causes you to lose track of what you were doing in one file when bsb temporarily moves on to some other file.

Bsb should perhaps instead prioritize the last modified file, if that's possible.

@bobzhang
Copy link
Member

@glennsl we can do it this way, suppose we know file_a is changed and file watcher is correct (sort of by Node), we call

ninja path/to/file_a.cm{j,i} all

(I need check if ninja respect the order though)

If it does, it should work

@glennsl
Copy link
Contributor Author

glennsl commented Feb 24, 2017

I've looked around a bit, and I've not found anything to indicate that target order is respected, but I have found evidence to the contrary: ninja-build/ninja#1055

I've also found this exact issue discussed in several issues dating as far back as 2011, with no resolution in sight:

The only possible solution I've found is to set up explicit order-only dependencies in the .ninja file, which would at least make it deterministic. But introducing additional constraints will also remove opportunities for parallelism, which might have a significant effect on performance, especially for full builds.

@bobzhang
Copy link
Member

@glennsl actually, we can do this from bsb side without bother ninja. so you get a file changed, you just recompile that file (assume that we compute the compiler flags from bsb) and run ninja later(no matter the former succeeds or not).

@glennsl
Copy link
Contributor Author

glennsl commented Feb 25, 2017

Ok, so when bsb_watcher calls back to bsb it should pass the name of the file that's changed (if avialable), bsb picks that up, execs bsc for just that file, then proceed to run ninja as usual?

@bobzhang
Copy link
Member

Yes, it requires some refactoring though

@bobzhang
Copy link
Member

bobzhang commented Mar 2, 2017

@glennsl This will help reduce the latency even for very large projects, I think it is the right direction

@glennsl glennsl closed this as completed Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants