|
500 | 500 | DefaultValue = "_$(SWIFT_VERSION)";
|
501 | 501 | },
|
502 | 502 |
|
| 503 | + // Operator OR for a default value condition, simulates `$(X) || $(Y)` in `DefaultValue` field. |
| 504 | + { |
| 505 | + Name = "SETTING_DefaultValue_YES_YES"; |
| 506 | + Type = Boolean; |
| 507 | + DefaultValue = YES; |
| 508 | + }, |
| 509 | + |
| 510 | + { |
| 511 | + Name = "SETTING_DefaultValue_YES_NO"; |
| 512 | + Type = Boolean; |
| 513 | + DefaultValue = YES; |
| 514 | + }, |
| 515 | + { |
| 516 | + Name = "SETTING_DefaultValue_NO_YES"; |
| 517 | + Type = Boolean; |
| 518 | + DefaultValue = YES; |
| 519 | + }, |
| 520 | + { |
| 521 | + Name = "SETTING_DefaultValue_NO_NO"; |
| 522 | + Type = Boolean; |
| 523 | + DefaultValue = NO; |
| 524 | + }, |
| 525 | + { |
| 526 | + Name = "SETTING_DefaultValue__"; |
| 527 | + Type = Boolean; |
| 528 | + DefaultValue = NO; |
| 529 | + }, |
| 530 | + |
| 531 | + { |
| 532 | + Name = "SWIFT_APPROACHABLE_CONCURRENCY"; |
| 533 | + Type = Boolean; |
| 534 | + DefaultValue = NO; |
| 535 | + Condition = "$(EFFECTIVE_SWIFT_VERSION) == '4' || $(EFFECTIVE_SWIFT_VERSION) == '4.2' || $(EFFECTIVE_SWIFT_VERSION) == '5'"; |
| 536 | + DisplayName = "Approachable Concurrency"; |
| 537 | + Category = "Concurrency"; |
| 538 | + Description = "Enables upcoming features that aim to provide a more approachable path to Swift Concurrency: DisableOutwardActorInference, GlobalActorIsolatedTypesUsability, InferIsolatedConformances, InferSendableFromCaptures, and NonisolatedNonsendingByDefault."; |
| 539 | + }, |
| 540 | + |
503 | 541 | // Upcoming Swift 6.0 features
|
504 | 542 | {
|
505 | 543 | Name = "ENABLE_SWIFT_6_UPCOMING_FEATURES_IN_SWIFT_VERSION_6_0";
|
|
566 | 604 | "<<otherwise>>" = ( "-enable-upcoming-feature", "StrictConcurrency" );
|
567 | 605 | };
|
568 | 606 | DisplayName = "Strict Concurrency Checking";
|
569 |
| - Category = "Upcoming Features"; |
| 607 | + Category = "Concurrency"; |
570 | 608 | Description = "Enables strict concurrency checking to produce warnings for possible data races. This is always 'complete' when in the Swift 6 language mode and produces errors instead of warnings.";
|
571 | 609 | },
|
572 | 610 | {
|
|
582 | 620 | MainActor = ( "-default-isolation=MainActor" );
|
583 | 621 | };
|
584 | 622 | DisplayName = "Default Actor Isolation";
|
585 |
| - Category = "Language"; |
| 623 | + Category = "Concurrency"; |
586 | 624 | Description = "Controls default actor isolation for unannotated code. When set to 'MainActor', `@MainActor` isolation will be inferred by default to mitigate false-positive data-race safety errors in sequential code.";
|
587 | 625 | },
|
588 | 626 | {
|
|
643 | 681 | {
|
644 | 682 | Name = "SWIFT_UPCOMING_FEATURE_DISABLE_OUTWARD_ACTOR_ISOLATION";
|
645 | 683 | Type = Boolean;
|
646 |
| - DefaultValue = "$(SWIFT_UPCOMING_FEATURE_6_0)"; |
| 684 | + DefaultValue = "$(SETTING_DefaultValue_$(SWIFT_UPCOMING_FEATURE_6_0)_$(SWIFT_APPROACHABLE_CONCURRENCY))"; |
647 | 685 | Condition = "$(EFFECTIVE_SWIFT_VERSION) == '4' || $(EFFECTIVE_SWIFT_VERSION) == '4.2' || $(EFFECTIVE_SWIFT_VERSION) == '5'";
|
648 | 686 | CommandLineArgs = {
|
649 | 687 | YES = ( "-enable-upcoming-feature", "DisableOutwardActorInference" );
|
|
685 | 723 | {
|
686 | 724 | Name = "SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES";
|
687 | 725 | Type = Boolean;
|
688 |
| - DefaultValue = "$(SWIFT_UPCOMING_FEATURE_6_0)"; |
| 726 | + DefaultValue = "$(SETTING_DefaultValue_$(SWIFT_UPCOMING_FEATURE_6_0)_$(SWIFT_APPROACHABLE_CONCURRENCY))"; |
689 | 727 | Condition = "$(EFFECTIVE_SWIFT_VERSION) == '4' || $(EFFECTIVE_SWIFT_VERSION) == '4.2' || $(EFFECTIVE_SWIFT_VERSION) == '5'";
|
690 | 728 | CommandLineArgs = {
|
691 | 729 | YES = ( "-enable-upcoming-feature", "InferSendableFromCaptures" );
|
|
755 | 793 | {
|
756 | 794 | Name = "SWIFT_UPCOMING_FEATURE_GLOBAL_ACTOR_ISOLATED_TYPES_USABILITY";
|
757 | 795 | Type = Boolean;
|
758 |
| - DefaultValue = "$(SWIFT_UPCOMING_FEATURE_6_0)"; |
| 796 | + DefaultValue = "$(SETTING_DefaultValue_$(SWIFT_UPCOMING_FEATURE_6_0)_$(SWIFT_APPROACHABLE_CONCURRENCY))"; |
759 | 797 | Condition = "$(EFFECTIVE_SWIFT_VERSION) == '4' || $(EFFECTIVE_SWIFT_VERSION) == '4.2' || $(EFFECTIVE_SWIFT_VERSION) == '5'";
|
760 | 798 | CommandLineArgs = {
|
761 | 799 | YES = ( "-enable-upcoming-feature", "GlobalActorIsolatedTypesUsability" );
|
|
797 | 835 | Name = "SWIFT_UPCOMING_FEATURE_EXISTENTIAL_ANY";
|
798 | 836 | Type = Enumeration;
|
799 | 837 | Values = (
|
800 |
| - Yes, |
801 |
| - Migrate, |
802 |
| - No, |
| 838 | + YES, |
| 839 | + MIGRATE, |
| 840 | + NO, |
803 | 841 | );
|
804 | 842 | DefaultValue = No;
|
805 | 843 | CommandLineArgs = {
|
806 |
| - Yes = ( "-enable-upcoming-feature", "ExistentialAny" ); |
807 |
| - Migrate = ( "-enable-upcoming-feature", "ExistentialAny:migrate" ); |
808 |
| - No = (); |
| 844 | + YES = ( "-enable-upcoming-feature", "ExistentialAny" ); |
| 845 | + MIGRATE = ( "-enable-upcoming-feature", "ExistentialAny:migrate" ); |
| 846 | + NO = (); |
809 | 847 | };
|
810 | 848 | DisplayName = "Require Existential any";
|
811 | 849 | Category = "Upcoming Features";
|
|
815 | 853 | {
|
816 | 854 | Name = "SWIFT_UPCOMING_FEATURE_INFER_ISOLATED_CONFORMANCES";
|
817 | 855 | Type = Boolean;
|
818 |
| - DefaultValue = NO; |
| 856 | + DefaultValue = "$(SWIFT_APPROACHABLE_CONCURRENCY)"; |
819 | 857 | CommandLineArgs = {
|
820 | 858 | YES = ( "-enable-upcoming-feature", "InferIsolatedConformances" );
|
821 | 859 | NO = ();
|
|
829 | 867 | Name = "SWIFT_UPCOMING_FEATURE_NONISOLATED_NONSENDING_BY_DEFAULT";
|
830 | 868 | Type = Enumeration;
|
831 | 869 | Values = (
|
832 |
| - Yes, |
833 |
| - Migrate, |
834 |
| - No, |
| 870 | + YES, |
| 871 | + MIGRATE, |
| 872 | + NO, |
835 | 873 | );
|
836 |
| - DefaultValue = No; |
| 874 | + DefaultValue = "$(SWIFT_APPROACHABLE_CONCURRENCY)"; |
837 | 875 | CommandLineArgs = {
|
838 |
| - Yes = ( "-enable-upcoming-feature", "NonisolatedNonsendingByDefault" ); |
839 |
| - Migrate = ( "-enable-upcoming-feature", "NonisolatedNonsendingByDefault:migrate" ); |
840 |
| - No = (); |
| 876 | + YES = ( "-enable-upcoming-feature", "NonisolatedNonsendingByDefault" ); |
| 877 | + MIGRATE = ( "-enable-upcoming-feature", "NonisolatedNonsendingByDefault:migrate" ); |
| 878 | + NO = (); |
841 | 879 | };
|
842 | 880 | DisplayName = "nonisolated(nonsending) By Default";
|
843 | 881 | Category = "Upcoming Features";
|
|
0 commit comments