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

feat: .NET Support #73

Merged
merged 5 commits into from
Sep 22, 2020
Merged

feat: .NET Support #73

merged 5 commits into from
Sep 22, 2020

Conversation

jsteinich
Copy link
Contributor

Adds support for generating a .NET (C#) project.

I choose namespace rather than package since it seemed more appropriate when generating source code.

I went with dotnet since it matches the jsii naming, but csharp may make more sense for configuration options / cli parameters. I don't believe there are any plans to generate F# code in jsii, but if there were, I'd lean towards using csharp naming.

@eladb
Copy link
Contributor

eladb commented Sep 21, 2020

@campionfellin can you take a quick look?

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Great job. Looks great.

README.md Outdated

```ts
await srcmak('srcdir', {
dotnet: {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd go with csharp here since this is producing source code and not a library (like Pacmak)

}
}
",
"Hello.World/dotnetpackage-0.0.0.tgz": "��X�o�H�g�
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be included in the snapshot

const reldir = options.csharp.namespace;
const source = path.resolve(path.join(workdir, 'dist/dotnet/', reldir));
const target = path.join(options.csharp.outdir, reldir);
await fs.move(source, target, { overwrite: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

How does dotnet package dependencies work? Just wondering if we should do it similarly to java with:

await ncp(source, target, { clobber: false });

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 think it makes sense as is since each module generates a standalone project. Applications would then have project dependencies on the generated projects.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great!

@campionfellin
Copy link
Contributor

LGTM!

@mergify mergify bot merged commit a0dc5ea into cdklabs:master Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants