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

[Server] Implement Gradle subprojects and scaffolding for the Python server. #1366

Merged
merged 11 commits into from
May 18, 2022

Conversation

crisidev
Copy link
Contributor

@crisidev crisidev commented May 5, 2022

Motivation and Context

See #1367.

Description

Implement Gradle subprojects and scaffolding for the Python server.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@crisidev crisidev added enhancement New feature or request x-large server Rust server SDK labels May 5, 2022
@crisidev crisidev added this to To do in Server SDK developer preview via automation May 5, 2022
@crisidev crisidev self-assigned this May 5, 2022
@crisidev crisidev changed the title [Server] Generate Rust/Python server bindings [WIP][Server] Generate Rust/Python server bindings May 5, 2022
@crisidev crisidev removed the x-large label May 5, 2022
@crisidev crisidev removed their assignment May 5, 2022
@crisidev crisidev changed the title [WIP][Server] Generate Rust/Python server bindings [WIP][Server] Implement Gradle subprojects and scaffolding for the Python server. May 5, 2022
@crisidev crisidev changed the title [WIP][Server] Implement Gradle subprojects and scaffolding for the Python server. [Server] Implement Gradle subprojects and scaffolding for the Python server. May 5, 2022
@crisidev crisidev marked this pull request as ready for review May 5, 2022 15:47
@crisidev crisidev requested review from a team as code owners May 5, 2022 15:47
@crisidev
Copy link
Contributor Author

crisidev commented May 5, 2022

There is a failing CI action, but it is expected as I am creating a bunch of new projects and the diff tool will need them on main before being able to generate the diff.

codegen-server/python/build.gradle.kts Outdated Show resolved Hide resolved
codegen-server/python/build.gradle.kts Outdated Show resolved Hide resolved
codegen-server/python/build.gradle.kts Outdated Show resolved Hide resolved
Comment on lines +72 to +98
tasks.register<Exec>(Cargo.CHECK.toString) {
workingDir("$buildDir/$workingDirUnderBuildDir")
environment("RUSTFLAGS", defaultRustFlags)
commandLine("cargo", "check")
dependsOn("assemble")
}

tasks.register<Exec>(Cargo.TEST.toString) {
workingDir("$buildDir/$workingDirUnderBuildDir")
environment("RUSTFLAGS", defaultRustFlags)
commandLine("cargo", "test")
dependsOn("assemble")
}

tasks.register<Exec>(Cargo.DOCS.toString) {
workingDir("$buildDir/$workingDirUnderBuildDir")
environment("RUSTDOCFLAGS", defaultRustDocFlags)
commandLine("cargo", "doc", "--no-deps")
dependsOn("assemble")
}

tasks.register<Exec>(Cargo.CLIPPY.toString) {
workingDir("$buildDir/$workingDirUnderBuildDir")
environment("RUSTFLAGS", defaultRustFlags)
commandLine("cargo", "clippy")
dependsOn("assemble")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

there's actually a way to share these between projects—I think the smithy project does it

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 was wondering about this.. I'll figure out how to do it. Thanks.

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 tried many things, but we really need the working dir which is defined in the build.gradle.kt, so I don't see how this can be shared between projects. Any pointers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If this is not a blocker for this PR, I have created #1378 to track this issue and solve it once I figure out how :)

@crisidev crisidev enabled auto-merge (squash) May 18, 2022 13:47
@crisidev crisidev merged commit 5881fea into main May 18, 2022
Server SDK developer preview automation moved this from To do to Done May 18, 2022
@crisidev crisidev deleted the oxipy branch May 18, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server Rust server SDK
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants