Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@ScottCarda-MS
Copy link
Contributor

@ScottCarda-MS ScottCarda-MS commented Mar 25, 2021

Changes the output for the C# Generation rewrite step to always put all of the generated files in the given output directory directly, not in subfolders and not respecting relative locations of their corresponding Q# source files. The naming convention for generated C# files is being updated to include a number when their is a name collision. For example, if Main.g.cs has already been written during a compilation and another Main.g.cs file is going to be written, it will instead write Main.g1.cs, and if that file also already exists, Main.g2.cs, and so on. There is a hardcoded limit at 100 enumerations of the same file name, so Main.g99.cs would be the last possible file name. The enumeration always precedes the final .cs.

@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review March 31, 2021 00:15
@ScottCarda-MS
Copy link
Contributor Author

I will need to find a way to add tests for this. @bettinaheim if you have any suggestions or similar existing tests, that would be helpful to look at.

@ScottCarda-MS ScottCarda-MS marked this pull request as draft March 31, 2021 00:16
Copy link
Contributor

@kuzminrobin kuzminrobin left a comment

Choose a reason for hiding this comment

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

I don't understand the code for now.
To not delay the development I'm approving, but I recommend to get at least one more approval.

@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review April 1, 2021 21:01
@ScottCarda-MS
Copy link
Contributor Author

I will need to find a way to add tests for this. @bettinaheim if you have any suggestions or similar existing tests, that would be helpful to look at.

Tests have been added now.

Copy link
Contributor

@bettinaheim bettinaheim left a comment

Choose a reason for hiding this comment

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

lgtm

@ScottCarda-MS ScottCarda-MS force-pushed the sccarda/EnumeratedFileNames branch from 7bcbfc5 to cdeef55 Compare April 5, 2021 18:21
@ScottCarda-MS ScottCarda-MS merged commit 525ea74 into main Apr 5, 2021
@ScottCarda-MS ScottCarda-MS deleted the sccarda/EnumeratedFileNames branch April 5, 2021 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants