sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.09k stars 128 forks source link

Clean provider Name Issue #394

Closed M-Nasser-M closed 1 week ago

M-Nasser-M commented 1 month ago

so i tried adding aws native and that was the error i recevied after looking at it it is the result of the "-" still being there in the aws-native

image

after looking at an old commit file because i noticed the bug wasn't there before check here it was after adding the provider lock commit there was a function in the go install file that edited provider name named cleanprovidername

i think the removal of this function is the cause of the error here is the code snippet of the function

 func cleanProviderName(name string) string {

result := regexp.MustCompile("\[^a-zA-Z0-9\]+").ReplaceAllString(name, "")
 result = strings.ReplaceAll(result, "pulumiverse", "")
 result = strings.ReplaceAll(result, "pulumi", "")
 result = strings.ReplaceAll(result, "sstprovider", "")
 return result

}

didn't have enough time to check if there was a contribution guide and do a pull request but hope this helps also when i fixed the config file manually it wouldn't let me deploy so i figured you might need to change something in provider-lock.json and after i changed the alias and remove the "-" it worked check the error below

image

tomjrob commented 1 week ago

I'm getting this same issue when trying to use the aws-native provider through sst today in a project.

As a helpful hint for others, downgrading sst-ion to version 0.0.345 is a workaround until this is fixed.

thdxr commented 1 week ago

fixed in v0.0.463