You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears incorrect cache keys are used for maven dependencies in smithy build json files. I'm able to work around this by "touching" the config file - I suppose this somehow busts the cache.
$version: "2.0"
namespace smithy.tests.endpointrules.defaultvalues
use smithy.rules#clientContextParams
@clientContextParams(
bar: {type: "string", documentation: "a client string parameter"}
)
service FizzBuzz {}
test2.smithy
$version: "2"
namespace smithy.ruby.tests
use smithy.protocols#rpcv2Cbor
@rpcv2Cbor
service Service {}
I suspect the caching folder needs to be scoped to config files. I think the current implementation assumes a project configuration file is used rather than explicit configs. A quicker solution to fix the bug could be to not use caching when an explicit config is given via --config.
I am running smithy AST in a directory to make json fixtures for testing. My logic will discover smithy build json files in the folder hierarchy. Sometimes I may invoke the command with multiple config files. My understanding is that they are merged in that case.
I would think you do want caching somehow to avoid pulling maven dependencies each time. In some cases I may have common smithy build (like in an endpoints folder) that pulls in endpoint rules traits for all of the sub directories. Whatever solution you decide, it should handle the multiple config file case I think.
It appears incorrect cache keys are used for maven dependencies in smithy build json files. I'm able to work around this by "touching" the config file - I suppose this somehow busts the cache.
Reproduction:
test1.json
test2.json
test1.smithy
test2.smithy
Try running:
If you don't see an error, run test1 again.
Bust cache with:
Whatever ast command you run first will succeed, the later one appears to fail.
The text was updated successfully, but these errors were encountered: