Skip to content

Warn users to delete the master specs repo if its not explicitly used. #9871

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

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

dnkoutso
Copy link
Contributor

No description provided.

@dnkoutso dnkoutso added this to the 1.10.0 milestone Jun 18, 2020
@dnkoutso dnkoutso requested review from paulb777 and amorde June 18, 2020 22:43
@dnkoutso dnkoutso force-pushed the warn_delete_master_specs_repo branch from d04b882 to db7fe12 Compare June 18, 2020 22:44
config.sources_manager.stubs(:all).returns([master_source])
@installer.send(:warn_for_removing_git_master_specs_repo)
UI.warnings.should.include 'Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the' \
' default, you may safely remove it from your repos directory via `pod repo remove master`.' \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@igor-makarov is pod repo remove master correct to delete the old master specs repo? We do not do any migration correct?

Basically we keep master and add trunk for users who upgrade from an older version of CP to one that uses CDN.

Copy link
Member

Choose a reason for hiding this comment

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

looks right to me

# Whether to emit a warning if a project is not explicitly specifying the git based master specs repo and can
# instead use CDN which is the default.
#
option :warn_for_unused_master_specs_repo, true
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 added this option because its possible that users might have multiple projects. One that uses master specs repo and one that doesn't. This will allow them not to have warnings and not ask them to delete the master specs repo.

@@ -49,6 +49,8 @@ class Installer

include Config::Mixin

MASTER_SPECS_REPO_GIT_URL = 'https://github.com/CocoaPods/Specs.git'.freeze
Copy link
Member

Choose a reason for hiding this comment

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

do we not have this defined anywhere else? I would think we still do but I guess it's possible we don't since we switched to CDN by default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we dont! neither in Core!

@dnkoutso dnkoutso force-pushed the warn_delete_master_specs_repo branch from db7fe12 to 59a84c7 Compare June 18, 2020 22:55
Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

The warning is only for Podfile usage and doesn't affect lint or trunk validation commands, right?

@dnkoutso
Copy link
Contributor Author

@paulb777 yes! I updated validator.rb to reflect that and ensure CI systems or other commands that use this dont output the warning.

@dnkoutso dnkoutso merged commit 4dd888f into CocoaPods:master Jun 19, 2020
@dnkoutso dnkoutso deleted the warn_delete_master_specs_repo branch June 19, 2020 00:24
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.

None yet

4 participants