Open swift-ci opened 4 years ago
@swift-ci create
Comment by Owen Voorhees (JIRA)
appendInterpolation requirements covered in https://github.com/apple/swift/pull/30827
Comment by Owen Voorhees (JIRA)
@_nonEphemeral diagnostics covered in https://github.com/apple/swift/pull/31649
Comment by Owen Voorhees (JIRA)
opaque result types covered in https://github.com/apple/swift/pull/32231
existential non-conformance covered by onyekachi (JIRA User) in https://github.com/apple/swift/pull/32524
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Task, DiagnosticsQoI | |Assignee | None | |Priority | Medium | md5: 230011cc6400163fd6373f03d406bf1bIssue Description:
This issue tracks coverage of the educational notes feature. Below is a non-exhaustive list of diagnostics which could benefit from having educational notes.
Feel free to add new diagnostics to the list if you notice any that are missing
If you're contributing a new note, please create a subtask for tracking
After adding a note, mark the item in the list below as completed
Details on how to contribute notes are available at https://github.com/apple/swift/blob/master/docs/Diagnostics.md#quick-start-guide-for-contributing-new-educational-notes
missing_append_interpolation, append_interpolation_static, append_interpolation_void_or_discardable, append_interpolation_access_control - explain special ExpressibleByStringInterpolation requirementscould_not_find_value_subscript, cannot_subscript_base - explain how to declare subscripts
could_not_use_type_member_on_instance - explain what static members are and how they can be used
could_not_use_type_member_on_protocol_metatype - explain what protocol meta types are
candidate_inaccessible, init_candidate_inaccessible - intro to access control
cannot_pass_rvalue_mutating_subelement, cannot_pass_rvalue_mutating, cannot_pass_rvalue_mutating_getter_subelement, cannot_pass_rvalue_mutating_getter, cannot_apply_lvalue_unop_to_subelement, cannot_apply_lvalue_unop_to_rvalue, cannot_apply_lvalue_binop_to_subelement, cannot_apply_lvalue_binop_to_rvalue - explain mutating keyword
expression_too_complex - give a very high level overview of why this happens, plus some tips for solving
cannot_pass_rvalue_inout_subelement, cannot_pass_rvalue_inout_converted, inout_change_var_type_if_possible, cannot_pass_rvalue_inout, cannot_provide_default_value_inout - explain inout argument restrictions
cannot_convert_thrown_type, cannot_throw_error_code - how to write an Error-conforming type that can be thrown
cannot_pass_type_to_non_ephemeral, cannot_pass_type_to_non_ephemeral_warning, cannot_use_inout_non_ephemeral, cannot_use_inout_non_ephemeral_warning, cannot_construct_dangling_pointer, cannot_construct_dangling_pointer_warning - explain @_nonEphemeral diagnostics, possible solutions to get proper behaviorthrows_functiontype_mismatch - explain throws effect on function subtyping
serialization_module_too_new, serialization_module_language_version_mismatch, serialization_module_too_old - explain why library evolution is required to use modules compiled w/ different compilers
unspaced_binary_operator_fixit, unspaced_binary_operator, unspaced_unary_operator - explain operator whitespace rules
module_not_compiled_with_library_evolution - explain why imports require library evolution
declared_operator_without_operator_decl - Explain operator decls and why just an implementation isn't sufficient
declared_unary_op_without_attribute, unary_op_missing_prepos_attribute, invalid_arg_count_for_operator, operator_in_local_scope, nonstatic_operator_in_nominal, nonstatic_operator_in_extension, nonfinal_operator_in_class, operator_in_unrelated_type - operator implementation requirements
optional_not_unwrapped, optional_base_not_unwrapped - explain pros and cons of different optional unwrapping strategies
missing_forced_downcast - explain the narrow cases where this is ok, and how it may just be programmer error
missing_explicit_conversion - explain why this is needed for e.g. bridging
invalid_c_function_pointer_conversion_expr, c_function_pointer_from_method, c_function_pointer_from_generic_function - explain c function ptr conversion rules
attribute_requires_operator_identifier - explain allowable chars in operator identifier
invalid_iboutlet, iboutlet_nonobjc_class, iboutlet_nonobjc_protocol, iboutlet_nonobject_type, iboutlet_only_mutable, iboutlet_non_optional - explain @IBOutlet requirements
invalid_ibdesignable_extension - @IBDesignable restrictions
inherited_default_value_not_in_designated_constructor, inherited_default_value_used_in_non_overriding_constructor, corresponding_param_not_defaulted - explain designated inits
pattern_type_not_usable_from_inline, pattern_type_not_usable_from_inline_warn, pattern_type_not_usable_from_inline_frozen, pattern_type_not_usable_from_inline_inferred, pattern_type_not_usable_from_inline_inferred_warn, pattern_type_not_usable_from_inline_inferred_frozen - explain @usableFromInline
Explain access control diagnostics (many)
opaque_type_invalid_constraint, inferred_opaque_type - explain opaque return typesExplain protocol conformance diagnostics (many)
Explain witness matching diagnostics (many)
Explain associated type inference diagnostics (many)
Explain override diagnostics (many)
multiple_enum_raw_types, raw_type_not_first, raw_type_not_literal_convertible, enum_raw_type_not_equatable, enum_raw_type_nonconforming_and_nonsynthable, empty_enum_raw_typeenum_raw_value_without_raw_type, enum_with_raw_type_case_with_argument, enum_non_integer_raw_value_auto_increment, enum_non_integer_convertible_raw_type_no_value, enum_raw_value_not_unique - enum raw types
objc_enum_no_raw_type, objc_enum_raw_type_not_integer - @objc enum raw values
Explain Hashable derivation diags
Explain Equatable derivation diags
Explain coddle derivation diags
Explain S4TF AdditiveArithmetic derivation requirements
dynamic_self_invalid, dynamic_self_in_mutable_property, dynamic_self_in_stored_property, dynamic_self_in_mutable_subscript, dynamic_self_invalid_property, dynamic_self_invalid_subscript, dynamic_self_invalid_method, dynamic_self_stored_property_init, dynamic_self_default_arg - allowable uses of covariant Self
autoclosure_function_type, invalid_autoclosure_and_convention_attributes, autoclosure_function_input_nonunit - explain how @autoclosure works
Explain lazy var diagnostics (many)
Explain S4TF @differentiable attribute diagnostics (many)
Explain S4TF @derivative attribute diagnostics (many)
Explain convenience init diagnostics (many)
optional_used_as_boolean, integer_used_as_boolean - explain conditions must be boolean, suggest alternatives
failed_to_produce_diagnostic - link to bugs.swift.org and explain how to file a bug (maybe add this to type checker in reasonable time, protocol x is broken diagnostics too)
Explain unsafeBitCast diagnostics (many), including why it should almost never be used
Explain @noescape diagnostics (many)
return_non_failable_init, return_init_non_nil - explain mailable inits
no_match_operator - explain how to implement custom pattern matching
unknown_case_must_be_catchall, unknown_case_where_clause, unknown_case_multiple_patterns, unknown_case_must_be_last - explain @unknown attribute
Explain do-try-catch diagnostics (many)
Explain required init diagnostics
Explain @objc diagnostics (many)
Explain @available diagnostics (many)
Explain exclusivity violation diagnostics (many)
Explain definite initialization diagnostics (many)
Explain overflow diagnostics (many)