Open skyrpex opened 1 year ago
Is it possible for the Wing Console to retrieve type information by talking with the language server maybe?
I think so, but I guess we'll need more than a resource path (eg, root/Default/cloud.Counter
) to retrieve information about that specific resource, right? Like a symbol from the wingfile?
@MarkMcCulloh any insights? 🙏🏻
The primary way of inspecting data in the language server is with a file position. In the console, we'd need this for each constuct. This is not easy, and tbh if we get that working I doubt we'd need to use the language server at all since we could just store all the data per your example.
The language server is meant to inspect wing source code, not the synthed output (or even intermediate JS). So in general it probably wouldn't be a good idea for this use case. We may be able to extract some of the introspection logic though.
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
The Console could use as much Type Information from a Wing Program as possible. We should find a way to retrieve such data and associate it with a given construct.
Type data that we're looking for:
cloud.Bucket
or custom classes such asMyBucket
)cloud.Bucket::put(key: str, value: str): void
,cloud.Bucket::onCreate(fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?)
Proposal
The Wing Compiler will generate, along with
tree.json
andsimulator.json
, atypes.json
with the following data: