Skip to content
Unverified Commit 85433cec authored by Burak's avatar Burak Committed by GitHub
Browse files

Python: Link `stubgen.{py,sh}` to `resources/` and read them using `getResource()` (#2692)

## Motivation and Context
Currently, we're relying on `runtimeConfig.runtimeCratesPath()` to read
`stubgen.{py,sh}` files, but that function only returns a path if we're
using `relativePath` for our runtime crates:
```
"runtimeConfig": {
      "relativePath": "../rust-runtime"
},
```
otherwise it returns `null` and in that case our code generator fails
with:
```
Projection pokemon-service failed: java.io.FileNotFoundException: null/aws-smithy-http-server-python/stubgen.py (No such file or directory)
java.io.FileNotFoundException: null/aws-smithy-http-server-python/stubgen.py (No such file or directory)
```

With this PR we're linking `stubgen.{py,sh}` to `resources/` folder and
reading them using `getResource()` function.

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the
smithy-rs codegen or runtime crates
- [ ] I have updated `CHANGELOG.next.toml` if I made changes to the AWS
SDK, generated SDK code, or SDK runtime crates

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent c2da4cf1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment