-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add parent cs folders to the paths of all the samples used in the Json-DateTime doc #1418
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
Conversation
|
Why did we decide to call all the cs files Program.cs and move the name to a folder instead? cc @mairaw, @rpetrusha |
|
Having csharp files in a cs directory allows for multiple languages to share the same parent directory (for example, we can now add a vb directory for a vb example). It also allows the language of the example to be readily determined without having to look at file extensions, and is useful for CI tools. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making this change, @layomia. Are you planning to submit a PR that changes the path to the samples where they're used in the docs repo? Although I've approved, we should wait to merge until that PR is ready.
I understand that we want to have language specific sub-directories. However, this PR is changing the file names too: snippets/standard/datetime/json/computing-with-jsondocument-error.cs → snippets/standard/datetime/json/computing-with-jsondocument-error/cs/Program.cs How about something like the following (rather than calling them all Also, what about the existing samples? They look to be in the csharp directory: Why are we using the "standard" directory for these? I don't really understand the folder layout of this repo, tbh. And the last time I added a sample, I ended up putting it in "core": See #492 (comment) from @BillWagner / @richlander |
Yes, dotnet/docs#14056 changes the paths. Can you please advise on the correct path structure, i.e. snippets/standard/datetime/json/computing-with-jsondocument-error/cs/Program.cs (current), versus and also the correct directory to place these samples, re @ahsonkhan's comment: #1418 (comment). |
|
@rpetrusha - any updates on this? If it makes no difference, I am fine with the current changes as is. I'd like to get this merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can defer any further folder/file name restructuring, imo.
|
As I mentioned in the previous PR where we discussed this, I think the folder name should be csharp, so it matches the language identifier and other paths where we've been using this: e.g. Thoughts? |
|
Seems reasonable to me. For example, I would be fine with the following layout:
|
Addresses #1412 (comment).
Used in dotnet/docs@3a082aa.