-
Notifications
You must be signed in to change notification settings - Fork 416
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
Private public overlap #598
Conversation
I think the check should go in the |
What about adding this check into |
That seems fine. That's better actually, since it should also catch issues with sub-systems such as inline tests trying to use a private library from a public one |
Hmm, resolve_dep isn't enough either because It's a shame we can't update the database itself somehow to exclude the private dependencies. This would save us having to thread this annoying parameter everywhere. But then proper location reporting is still an issue. |
cda4d61
to
3851523
Compare
Nvm, I ended up fixing the problem. I just needed to detect the allow_private_deps status directly in instantiate. But still, passing around this param everywhere isn't pretty. |
This is necessary for public libraries defined by the user. They may not have private dependencies as that would make not installable.
692ddd0
to
4b6b3d1
Compare
On second thought, I think this approach with allow_private_deps doesn't really work when we take preprocessors into account. Private preprocessors may be introduced in public libraries as long they don't have any private runtime dependencies. How about we doing the following: we verify the list of dependencies only in |
Checking in resolve_dep seems better to me. For the preprocessors, we just need to selectively do this check in |
I'm not entirely sure about find_internal. I did gave that approach a try but it didn't work for me. IIRC, for a preprocessor we are allowed private dependencies to build it, but we still cannot introduce private runtime dependencies. And that case never ended up working. I'm not too sure about doing it instantiate, but passing a flag to |
Closed in favor of #607. |
This is a more correct fix for #580. I might have done it wrong, but this fix still isn't complete. It will still generate an incorrect META if you do so without building the actual library. This is possible by requesting the META target directly or having a library defined without any modules. Do we need both fixes, or somehow tweak this one to cover the META case?
Also, I. I'm not generate a good error value so I just a dumb thing that will work. Would like to know if there's a proper way to do this.