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

[SharedCache] Fix DSCObjCProcessor::PostProcessObjCSections and improve Objective-C processing #6198

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Commits on Nov 25, 2024

  1. [SharedCache] Fix post-processing of Objective-C sections

    Prior to this commit the function `DSCObjCProcessor::PostProcessObjCSections` never does anything because it doesn't use the correct names to get the Objective-C sections of the recently loaded library. In fact it never does anything because the DSC never has sections with the names its searching for.
    
    This commit passes the `baseName` (the name of the library that was loaded), which is what other Objective-C section processing code does. Combining the base name with the section names it will now find them and process them as intended. This was resulting in alot of Objective-C related stuff being missed.
    
    There is however still an issue of the fact that the way this DSC plugin works means it only analyzes Objective-C sections once. This catches alot of things but there are a number of cases where other libraries need to be loaded first due to information being referenced in another library. For instance errors like `Failed to determine base classname for category` can be caused by the class reference in the category being to a class outside of the loaded library. Once the library containing the class has been loaded, the section containing the category should be re-proccessed.
    WeiN76LQh authored and WeiN76LQh committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    43d3144 View commit details
    Browse the repository at this point in the history
  2. [SharedCache] Add the ability to skip Objective-C processing when loa…

    …ding a library
    
    This is useful when batch loading libraries to avoid extra processing (once the next commit has landed).
    WeiN76LQh authored and WeiN76LQh committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    a731882 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2024

  1. [SharedCache] Add the ability to manually trigger Objective-C processing

    A problem with processing Objective-C sections at the time a library is loaded is that some of the references within those sections may refer to unload sections. This results in things like selectors not being correctly typed and named.
    
    This commit provides a way for users to manually trigger Objective-C parsing against sections for a specific library or all libraries, via the API. Combined with the previous commit a user can use the API to batch load a number of libraries and skip Objective-C processing for each one and then run it across the entire of the DSC once they are all loaded.
    
    Further improvement would be to provide a way to trigger Objective-C processing through the UI.
    WeiN76LQh authored and WeiN76LQh committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    96cfc3d View commit details
    Browse the repository at this point in the history