The <pulumi-provider-boilerplate> as it currently ...
# general
b
The pulumi-provider-boilerplate as it currently exists - if you clone it and run the SDK codegen - seems to have a bug. It generates the dotnet SDK without a package reference to the
Pulumi
NuGet package (see here), so the generated dotnet SDK can't build as it is. Originally I thought OK maybe the stock
schema.json
is just missing an argument to add that reference, but the nodejs SDK generated from the same provider code does have the reference. So I'm wagering it was a bug potentially introduced during changes made to release
azure-native
? Any thoughts on what I need to do so that the codegen adds that reference?
Well I may have just answered my own question - but of note is the fact that the
azure-native
implementation of
schema.json
has the following at the bottom:
Copy code
"csharp": {
            "namespaces": {
                "aad": "Aad",
                "aadiam": "AadIam",
                "addons": "Addons",
                "adhybridhealthservice": "ADHybridHealthService",
                "advisor": "Advisor",
       ...
                "windowsiot": "WindowsIoT",
                "workloadmonitor": "WorkloadMonitor"
            },
            "packageReferences": {
                "Pulumi": "3.*",
                "System.Collections.Immutable": "5.0.0"
            }
Which I haven't tried yet but I'd wager would fix my issue with that reference being missing. So then the question is, why does
nodejs
not require something similar in order to add the reference, and is that an issue or not?
Alright so the dotnet codegen is now correctly adding the reference with that
packageReference
entry in
schema.json
but still cannot build because it doesn't seem to be generating the embedded
version.txt
file...
Hey @tall-librarian-49374 I just noticed this thread , must've missed that, going to give your fork a try but I notice that at the very least your fork's generated dotnet sdk also seems to be missing the embedded
version.txt
file - is that intended?
t
(I believe I can remove
System.Collections.Immutable
)
b
yea it does! The OG boilerplate though doesn't have your reference in the codegen though and also doesn't have it in schema.json, and dotnet codegen gets generated without the reference while nodejs codegen gets it. Which is a little weird but I guess that's a non-issue, it just looks like the OG boilerplate needs to be updated. Got it though, yours is generated in the makefile. Thank you!
t
Yeah we need to merge the fork back
b
Hey @tall-librarian-49374, so I managed to clone your fork and setup an environment and get everything working after making some changes to the provider and what not. Then I took the step to start my own repository and copy my work over there so I could check it into our source control (we use azure devops). At this point the
pulumictl
command stopped working - it is giving me the error
error calculating version: getting language versions: error opening repository: repository does not exist
but I cannot get it to output what repository it is trying to connect to, even with the
--debug
flag. Can you give me any information on what this is trying to do or what it depends on?
To be specific this is when it tries to do any of the
pulumictl get version ...
commands
t
I’m not super familiar with details but it works with git. Do you have at least one commit in the new repo?
You can see it here btw https://github.com/pulumi/pulumictl
b
Yea I do have initial commits in - I was wondering if maybe it was relying on the
.git
folder being in the working directory or something because our directory structure for the new repo has that higher up
t
@billowy-army-68599 or @broad-dog-22463 would know
b
Thank you. I think I might be right about it looking for the .git directory
b
Yeah you’ll need to pass the cwd flag
b
@billowy-army-68599 can you help me understand how it is determining version? I thought it was looking at
version.go
but apparently not. If I wanted to bump the version, what steps need to be taken?
b
It gets the version from the git tags
You’re free to remove it from your process and version however you want
But this’ll generate versions correctly for all the different languages which is not much fun 😅
b
ahh ok so it's expecting a tag like
vX.X.X
?