openvsx
openvsx copied to clipboard
Some extensions which don't have 'universal' targetPlatform appear as not found in cli tool
hello, i was using cli tool to find extensions that are not on https://open-vsx.org/
I found out that Python debugger is on open-vsx but it says not found, https://open-vsx.org/extension/ms-python/debugpy.
after going through code, i found out that by default it checks for "universal". but python debugger have "darwin-arm64' as targetted platform.
how to reproduce?
- try
ovsx get --metadata ms-python.debugpy
how can we fx it?
- by default, make it search without specifing target platform in url path.
- OR, add option to ignore platform specification
https://open-vsx.org/api/ms-python/debugpy -> works https://open-vsx.org/api/ms-python/debugpy/ -> not found https://open-vsx.org/api/ms-python/debugpy/universal -> not found
https://open-vsx.org/api/ms-python/debugpy -> works
As expected. This API endpoint passes null as the target platform.
https://github.com/eclipse/openvsx/blob/91ba91ddbae762d37a38c78756a39716eb487aae/server/src/main/java/org/eclipse/openvsx/RegistryAPI.java#L285
Only if the targetPlatform is valid, it is included as a condition in the query:
https://github.com/eclipse/openvsx/blob/91ba91ddbae762d37a38c78756a39716eb487aae/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionVersionJooqRepository.java#L864-L866
null is not a valid target platform value: https://github.com/eclipse/openvsx/blob/91ba91ddbae762d37a38c78756a39716eb487aae/server/src/main/java/org/eclipse/openvsx/util/TargetPlatform.java#L47
https://open-vsx.org/api/ms-python/debugpy/ -> not found
Yes, the extra slash causes a 404.
https://open-vsx.org/api/ms-python/debugpy/universal -> not found
As expected. This extension doesn't target the universal platform.
@KMohZaid where in the code is the bug?
@KMohZaid where in the code is the bug?
Hello, I meant cli tool should have option to not specify target platform. For someone who want to get extensions regardless of its target platform or for people like me who want to find all extensions that are not published on open-vsx and update manually
Yes, the extra slash causes a 404.
Yeah i got it why, it is treating target platform as "" empty string