Skip to content

Cannot generate the resource client building statement correctly #46

Open

Description

@jianzs

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

For the code below, the queue is a cloud resource. If a lambda function accesses the queue, in the generated compute module code, there should be a client building statement for the queue. However, currently, the generated statement is incorrect. It does not use 'def.Queue' as its initialized class but instead uses 'Queue'.

// User code
import * as def from "@plutolang/pluto";
const queue = new def.Queue();
// Generated compute module
import * as def from "@plutolang/pluto";
const queue = Queue.buildClient(...);  // Wrong!
const queue = def.Queue.buildClient(...);  // Expected

2. What did you expect to see? (Required)

Create the client by utilizing the initialized class that was used by the user.

3. What did you see instead (Required)

Create the client using a hard-coded approach.

4. What is your Pluto components version? (Required)

0.0.5

Activity

  1. added
    enhancement
    generator
    bug
    on Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancementgenerator

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions