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

global.json should allow comments #411

Closed
2 of 5 tasks
Porges opened this issue Apr 11, 2023 · 8 comments
Closed
2 of 5 tasks

global.json should allow comments #411

Porges opened this issue Apr 11, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@Porges
Copy link

Porges commented Apr 11, 2023

Description:

Per the documentation, the global.json file allows comments. Adding a comment to the file causes setup-dotnet to fail to parse it.

Task version:
v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Add a comment to the global.json file.

Expected behavior:
The file should still parse.

Actual behavior:
The file does not parse.

@Porges Porges added bug Something isn't working needs triage labels Apr 11, 2023
@Porges Porges changed the title global.json allows comments global.json should allow comments Apr 11, 2023
@IvanZosimov IvanZosimov self-assigned this Apr 11, 2023
@IvanZosimov
Copy link
Contributor

Hi, @Porges ! Thanks for the issue, we will take a look.

@IvanZosimov IvanZosimov removed their assignment Apr 11, 2023
@nogic1008
Copy link
Contributor

ref: #254

@xt0rted
Copy link

xt0rted commented Apr 27, 2023

I have an action that wraps this one and adds support for global.json comments (plus a few other things). It's a little out of date and needs to be updated to v3 of actions/setup-dotnet, but I use it in all my repos and it's been working fine for them.

If you don't want to use this you could also copy the steps to strip the comments and then revert the change to any of your workflows.

https://github.com/xt0rted/setup-dotnet/blob/6f04e7f8ca9ff2faf76540fe2e3ebc595ca38b6b/action.yml#L79-L102

@IvanZosimov
Copy link
Contributor

Hi, @xt0rted 👋 Thanks for the comment! Actually setup-dotnet open to any contributions, so if you feel like you may want contribute to the current version you will be more than welcome!

@nikolai-laevskii
Copy link
Contributor

Thank you for pointing out the issue! Fix is on its way and will be available in the closest release.

@karlpothast
Copy link

It would be nice if you added a top level property to store the path for one master global.json file so you could just create symbolic links for any other directory. Then if want to change the SDK globally you can just toggle that one file.

@IvanZosimov
Copy link
Contributor

Hi, @karlpothast 👋 Thank you for the comment! May I ask you to create a separate feature request for the functionality you proposed? It'd be better in terms of tracking and you could add more context/description of the feature there.

@karlpothast
Copy link

Thank you for replying so quickly @IvanZosimov. Actually after reviewing the overview specs I realized that the multi-line comment feature will work just fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants