Skip to content

Conversation

cgrindel
Copy link
Contributor

@cgrindel cgrindel commented Jul 23, 2022

Related to #573.

  • Add initializers with defaults to XcodeScheme structs.
  • Add XcodeScheme.ProfileAction.
  • Move shouldCreateScheme filter to createAutogeneratedXCSchemes. It was in the shared code.
  • Add targetResolver(referencedContainer:) to Fixtures.

@cgrindel cgrindel force-pushed the cg/gh573_create_custom_schemes branch from 2e66d02 to 0e1e5c2 Compare July 23, 2022 14:36
@cgrindel cgrindel requested a review from brentleyjones July 23, 2022 14:37
brentleyjones
brentleyjones previously approved these changes Jul 23, 2022
Copy link
Contributor

@brentleyjones brentleyjones left a comment

Choose a reason for hiding this comment

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

If we are creating custom schemes, shouldn't the ones for Generator have changed?

@cgrindel
Copy link
Contributor Author

@brentleyjones You are correct. I will investigate before merging this PR.

@cgrindel
Copy link
Contributor Author

The //tools/generator:xcodeproj target is configured with scheme_autogeneration_mode set to all. Hence, it is generating both the custom and autogenerated scheme. The custom scheme is named Generator. One of the autogenerated schemes is called generator. The last one in the list wins.

For this PR, I will rename the custom scheme to not conflict. I have added two tasks to #573.

  • Enable scheme_autogenrate_mode auto.
  • Ensure that autogenerated scheme names do not conflict with custom scheme names.

@cgrindel cgrindel force-pushed the cg/gh573_create_custom_schemes branch from 0e1e5c2 to 452fc83 Compare July 23, 2022 22:33
@cgrindel
Copy link
Contributor Author

I verified that the custom scheme is written (Good catch, @brentleyjones). I launched the scheme in Xcode and was able to build and test it successfully.

@cgrindel cgrindel requested a review from brentleyjones July 23, 2022 22:42
Copy link
Contributor

@brentleyjones brentleyjones left a comment

Choose a reason for hiding this comment

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

When there is conflicting schemes, can we have the custom ones just override the automatic one? Seems better than an error, since one controls the name of the custom scheme.

@brentleyjones
Copy link
Contributor

brentleyjones commented Jul 23, 2022

(Would require changing the order that they are made in, but I think that's for the best. Or the automatic ones can get a list of custom ones made and not make ones from it, etc.)

@cgrindel
Copy link
Contributor Author

When there is conflicting schemes, can we have the custom ones just override the automatic one? Seems better than an error, since one controls the name of the custom scheme.

Sure. I was going to add code that checks an autogenerated scheme name and add a prefix (e.g., (generated)), if there was a conflict. However, I am happy to just skip the autogenerated one. Whichever you want is fine with me.

@cgrindel cgrindel merged commit ff0176c into main Jul 23, 2022
@cgrindel cgrindel deleted the cg/gh573_create_custom_schemes branch July 23, 2022 22:52
@brentleyjones
Copy link
Contributor

I like skipping the autogenerated one. Then one can use top_level and still define a custom one to "tweak" and existing top level autogenerated scheme.

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.

2 participants