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

Add thread checkers to xcscheme.diagnostics #3096

Conversation

cerisier
Copy link
Contributor

@cerisier cerisier commented Oct 24, 2024

This PR adds 2 additional diagnostics to xcscheme.diagnostics as configurable in Xcode like below:

image
They are enabled by default for retrocompat but it's also the default in Xcode.

I wasn't sure what naming convention to adopt in this PR because:

  1. Those flags in the .xcscheme plist are negative flags, vs the other diagnostics flag which are positive flags:
    1. disableMainThreadChecker.
    2. disablePerformanceAntipatternChecker.
  2. disablePerformanceAntipatternChecker flag doesn't match the name of the option in Xcode:
    1. Thread Performance Checker
  3. The current xcscheme.diagnostic API only has positive flags but does not mention enable:
    1. address_sanitizer, thread_sanitizer.

In the end, I chose to start with the xcscheme.diagnostic API and follow the convention there:

xcschemes.diagnostics(
    main_thread_checker = False,
    thread_performance_checker = False,
)

which uses a positive flag upon until the xcscheme tool execution:

if !enablePerformanceAntipatternChecker {
    components.append(#"disablePerformanceAntipatternChecker = "YES""#)
}

Let me know if you want this done differently ?

@cerisier cerisier requested a review from a team as a code owner October 24, 2024 17:40
Signed-off-by: Corentin Kerisit <[email protected]>
Signed-off-by: Corentin Kerisit <[email protected]>
Signed-off-by: Corentin Kerisit <[email protected]>
Signed-off-by: Corentin Kerisit <[email protected]>
Signed-off-by: Corentin Kerisit <[email protected]>
@cerisier cerisier force-pushed the user/corentin/main-thread-checker branch from fdeb07c to ff38973 Compare October 24, 2024 17:59
Signed-off-by: Corentin Kerisit <[email protected]>
Signed-off-by: Corentin Kerisit <[email protected]>
@cerisier cerisier force-pushed the user/corentin/main-thread-checker branch from 1353bbd to fd0f6ff Compare October 28, 2024 19:05
Co-authored-by: Brentley Jones <[email protected]>
Signed-off-by: Corentin Kerisit <[email protected]>
@cerisier cerisier changed the title Add "Main Thread Checker" and "Thread Performance Checker" to xcscheme.diagnostics Add Thread checkers to xcscheme.diagnostics Oct 28, 2024
Signed-off-by: Corentin Kerisit <[email protected]>
@cerisier cerisier force-pushed the user/corentin/main-thread-checker branch from 364283b to c2d2c60 Compare October 28, 2024 19:36
@cerisier
Copy link
Contributor Author

Sorry.. Should be good now.

@brentleyjones brentleyjones changed the title Add Thread checkers to xcscheme.diagnostics Add thread checkers to xcscheme.diagnostics Oct 28, 2024
@brentleyjones brentleyjones merged commit 7b985ff into MobileNativeFoundation:main Oct 28, 2024
13 of 17 checks passed
@cerisier cerisier deleted the user/corentin/main-thread-checker branch October 28, 2024 20:45
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