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

Deprecate unnecessary public methods on CygwinService #3026

Closed
2 tasks done
vexx32 opened this issue Feb 14, 2023 · 1 comment
Closed
2 tasks done

Deprecate unnecessary public methods on CygwinService #3026

vexx32 opened this issue Feb 14, 2023 · 1 comment
Labels
5 - Released Deprecate Features or functionality that is being deprecated in favor of removing or replacing them in future.
Milestone

Comments

@vexx32
Copy link
Member

vexx32 commented Feb 14, 2023

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

There are a few methods attached to the CygwinService class that are not part of the IServiceRunner interface but are specified as public for that class. They have no expectation of actually being called externally and are solely used in our code internally in that class.

Describe The Solution. Why is it needed?

We should obsolete these methods with the intention of making them private or removing them in a future version. Specifically:

  • set_root_dir_if_not_set() (see File not found error when using --source=cygwin to install packages #2953, there is a bug somewhat related to this) this method can be removed in a future version and replaced with something else for the class to use in future.
  • get_exe() is used internally in the class to get the cygwin executable path, there's not really a pressing need for this to be accessible externally.
  • build_args() is again used internally in the class to get the argument string to use with the Cygwin executable. As this is internal logic it probably should not be a public method.

Additional Context

No response

Related Issues

A follow-up issue, to deal with the deprecated methods has been added to the 2.0.0 milestone:

@vexx32 vexx32 added this to the 1.3.0 milestone Feb 14, 2023
vexx32 added a commit to vexx32/choco that referenced this issue Feb 14, 2023
These methods are used primarily internally in the CygwinService and
should not be part of the public API. Deprecating them now so that we
can remove them or make them private or internal in future.
vexx32 added a commit to vexx32/choco that referenced this issue Feb 14, 2023
These methods are used primarily internally in the CygwinService and
should not be part of the public API. Deprecating them now so that we
can remove them or make them private or internal in future.
vexx32 added a commit to vexx32/choco that referenced this issue Feb 14, 2023
These methods are used primarily internally in the CygwinService and
should not be part of the public API. Deprecating them now so that we
can remove them or make them private or internal in future.
gep13 added a commit that referenced this issue Feb 15, 2023
(#2953, #3026) Ensure CygwinService can find the correct RootDirectory
@vexx32 vexx32 closed this as completed Feb 15, 2023
@vexx32 vexx32 added Task Deprecate Features or functionality that is being deprecated in favor of removing or replacing them in future. 5 - Released and removed Improvement Task 4 - Done labels Feb 15, 2023
@vexx32
Copy link
Member Author

vexx32 commented Feb 15, 2023

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

gep13 added a commit that referenced this issue Feb 16, 2023
* support/1.x:
  (#3026) Deprecate CygwinService public methods
  (#2953) CygwinService: always set RootDirectory
  (tests) Enable local source
  (maint) Remove/Fix some comments mentioning WebPI
  (#2958) Deprecate WebPI source runner
  (#2981) Deprecate install with direct file path
  (#2985) Deprecate features/sources in `config list`
  (#2983) Deprecate `--remove` option for apikey cmd
  (#2930) Update GenerateDocs.ps1 for choco-theme
  (build) Update Github workflow action versions
  (maint) Add GitReleaseManager.yaml
  (build) Add GitVersion.yml file
  (build) Add missing Criteria
  (build) Update to latest Chocolatey.Cake.Recipe
  (build) Add parameter to not build AWS projects
  (#2870) Update sln and csproj files
  (#2870) Adds No7zip build to recipe.cake

# Conflicts:
#	GenerateDocs.ps1
#	GitVersion.yml
#	gitreleasemanager.yaml
#	src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1
#	tests/chocolatey-tests/commands/choco-install.Tests.ps1
#	tests/chocolatey-tests/commands/choco-list.Tests.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released Deprecate Features or functionality that is being deprecated in favor of removing or replacing them in future.
Projects
None yet
Development

No branches or pull requests

1 participant