Open mutability opened 8 years ago
What's the use case for calling stapi::init with different directories? I don't think that should be necessary.
Packages that want to use stapi that are not aware of each other.
There is an attempted fix for this in the stapi-fixes branch. It keeps track of the directory associated with each base filename, and keeps using it.
I'm also pondering whether ignoring subsequent calls to init would be better.
Can you see if this fix works for your use case?
I have rebased the stapi-fixes branch up to master. Can you please verify that it fixes this problems so I can merge it back?
Should be fixed with merge of stapi-fixes. @mutability - could you check?
(I hesitate to call this a bug, but it causes very non-obvious failures)
If you call stapi::init twice with different -dir values, then any ctables managed by stapi that were created between the two calls get confused because they can no longer find their working files (as [workname $ctable foo] starts returning a different value)
It might make sense to store the build dir used during init_ctable per ctable, so that later changes to build_root do not make things fail.