2.2.8.8 release notes

 2.2.8.8

  • Issue 2426 - In Apex, it's technically valid to dereference System.Map.values() as a single instance of the map's value type, though only when the value type is some type of SObject, e.g., accountsByName.values()?.AccountNumber, and only when the map has exactly one entry. To be blunt, I don't like that allowed idiom for a few reasons. It feels unnecessary and unsafe—pay specific attention to the use of the safe navigation operator before accessing fields of the one-and-only map entry's value—and in order to provide proper support, it muddies the variant code completions offered for the values() method to include both instance methods of System.List and fields of the map's value type. Having said that, it is allowed and valid, so I've added support for it in IC2's expression type evaluator.
  • Issue 2449 - Added support for email templates created and managed via the Lightning app. Those aren't reported via the Metadata API and must be discovered using SOQL. Note that, at least at present, it doesn't appear that email templates stored under the "Private Email Templates" folder can't be retrieved.
  • Issue 2450 - First cut at porting the LWC HTML and JavaScript code snippets to IC2 as live templates. First off, I want to acknowledge and thank the authors of those incredibly useful and powerful code snippets as these are direct translations of their work. You can learn more about them here. Obviously the tool-specific instructions on how to use them are going to be different, and instead you should refer to the linked documentation on JetBrains' live templates feature above, but otherwise the exact same code snippets are offered with the exact same names. I have updated them to take advantage of auto-completion as appropriate, e.g., when the template stops to prompt for an enumerated attribute value, controller variable, or similar, to provide quick and smooth population of the resulting code. Note that there are still a few known issues with some of the JavaScript live templates that I'm investigating, but I figured that these are useful enough immediately that it makes sense to get them into users' hands now. Also note that I've slightly changed the way that the LWC live templates are organized in the IDE settings such that what was previously just LWC is now partitioned into LWC ImportsLWC HTML Snippets, and HTML JavaScript Snippets.

    NOTE: For the best experience with the HTML live templates, it is strongly recommended that you set Settings / Preferences | Editor | Code Style | HTML | Other | Generated quote marks to None. That's actually recommended for all LWC development, but it's even more important here as otherwise quoted attribute values can end up with doubly-nested quote marks.
  • Speaking of IC2's expression type evaluator, in this build I've made significant changes—and specifically significant enhancements—to the way that IC2 assesses the level of assignability between two expressions. Expression assignability assessment is used for reference resolution, standard Apex code completion ordering and smart Apex code completion filtering, Apex static code analysis, various Apex refactorings, and much more. I won't bore you with the details of the previous and new approaches, but the new approach is more definitive and deterministic and fixes a number of long-standing bugs; it also exposed a number of other bugs masked by the previous approach that I've fixed as a result. The new approach has been very well-tested including successful Apex code inspection runs against a large number of prominent open source Salesforce projects. However, it's very possible (read "likely") that you might see issues in your local project(s) from this change. If so, please log a bug in the public issue tracker with a description of the issue including how things behaved previously, how they behave now, and ideally a concrete example that reproduces the issue. I will, of course, address such issues very quickly.
  • Fixed an issue that was preventing the Profile unit test executor from being offered properly for Apex unit test context configurations.
  • Fixed a number of other (semi-)related issues. NOTE: One fix changes the signature of the System.runAs(Version) method in the OST to use System.Version instead of Package.Version as the formal parameter type. If you use that method in your project(s), you will want to regenerate your OST to ensure proper reference resolution for calls to that method.