Prevent missing export of symbols for node and python #2384
Replies: 2 comments
-
Design discussion for: #2335 |
Beta Was this translation helpful? Give feedback.
-
A point to make about the Integration Test: |
Beta Was this translation helpful? Give feedback.
-
During this release cycle, we had some last minute fixes due to missing exports of our node and python clients. We would like to create a mechanism, preferably automated, to dynamically identfy even newly added public symbols that should be part of the API, but isn't included in either
node/npm/glide/index.ts
for node, orpython/python/glide/__init__.py
for python.One approach is to utilize
Abstract Syntax Tree
modules (ast
module for python, and TypeScript compiler API for node) to get all public symbols programmatically, and compare them with__all__
ormodule.exports
list.Another worth noting point for python is, unlike node, being included in the
__all__
list is actually not required for end users to import a symbol. User should still be able to import it with the full package structure, as public symbols are always accessable in python. Although we probably still want to maintain this list for consistency reason, it could be considered as less critical when some symbols are missing from the__all__
list, comparing to node.Proposed Solution: Add an integration test for each language that compares all exported (symbols) Types/Functions/Classes/enums in the released package with the list of all public Types/Functions/Classes/enums. This list should be 'similar', and all differences should be explicit.
This list should be exactly the same as the list defined in #2377
Beta Was this translation helpful? Give feedback.
All reactions