You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some exceptions, like NotFoundException is in the conan.internal.errors namespace, however this is a public exception that can be returned by API functions like self.api.local.inspect(), so it should probably be public.
I know that the local API is undocumented at the moment, but we use it for inspect and editable package management, so it should probably not be.
This happens with at least 2.9.3 and 2.10.2
How to reproduce it
No response
The text was updated successfully, but these errors were encountered:
At the moment, the public exceptions that users can use in code are those documented and in the public namespace. It is not a problem that Conan is raising a NotFoundException, this should inherit from ConanException so the correct approach so far is to try: ... except ConanException:.
If there is some use case that would support creating more public exceptions, please let us know the details of such a use case. If not, we prefer to keep the number of exceptions raised by Conan and managed by users to a minimum.
The workspace we are building contains an unknown amount of conanfiles, with unknown dependencies, including python requirements
We don't want to construct the graph for all operations, nor export everything to the cache, so inspect is used to get basic properties
This fails with NotFoundException in the case where a python requires is not available at that time
So we do something like this (pseudocode)
whilepackages:
package=packages.pop()
try:
api.local.inspect(package)
# Export it to cache if it's a python requires packageexceptNotFoundException:
# Retry later (the python requires package will have been processed when it's retriedpackages.append(package)
# Other errors are complete failures
I realize now that we don't really need this whole complex system anymore, since we only have one python requires package, which we export before everything else. When it was made, I think we had some code generation, so it was not possible to do that.
So, strictly the exception is not needed for us anymore. However, I still think that it's a useful one, since it provides more information than the other reasons of failure.
Describe the bug
Some exceptions, like
NotFoundException
is in theconan.internal.errors
namespace, however this is a public exception that can be returned by API functions likeself.api.local.inspect()
, so it should probably be public.I know that the local API is undocumented at the moment, but we use it for inspect and editable package management, so it should probably not be.
This happens with at least 2.9.3 and 2.10.2
How to reproduce it
No response
The text was updated successfully, but these errors were encountered: