Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add multi-lang name overrides page #7429

Closed

Conversation

vikram-dagger
Copy link
Contributor

No description provided.

Signed-off-by: Vikram Vaswani <vikram@dagger.io>
@vikram-dagger vikram-dagger force-pushed the docs-263-aliases-name-overrides branch from 6beee28 to 43aac09 Compare May 21, 2024 12:03
@@ -0,0 +1,33 @@
import { dag, Container, object, func, field } from "@dagger.io/dagger"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomChv please review this code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👆 @TomChv

@object()
class MyModule {
/**
* Definition
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a disparity between the SDKs here. To achieve the output shown in this page for both languages, I needed to document ("Definition" comment) the constructor argument and constructor twice for TypeScript, but only once for Python. Is this intentional @helderco @TomChv ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because in one case, def_ is a field, in the other he's an argument of the constructor.
It's 2 different things

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I still didn't understand this. Are the TypeScript and Python snippets equivalent?

  • If yes, then why is the additional inline doc required in the TypeScript code?
  • Or if not, can you please suggest code changes inline to make them equivalent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomChv @helderco for help with above.

Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Signed-off-by: Vikram Vaswani <vikram@dagger.io>
Copy link
Member

@TomChv TomChv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@shykes
Copy link
Contributor

shykes commented May 24, 2024

We should not document this. It's not clear that it's a good pattern. Let's remove instead.

@shykes shykes closed this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants