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

🐛 Change the type of markers.Collector.byPackage's key from string to *loader.Package #792

Merged
merged 2 commits into from
Jul 12, 2023

Commits on Apr 9, 2023

  1. Add a testcase to reproduce bug of markers

    Markers might be lost in generated CRD when the package containing
    markers is referenced by several packages and CRD is generated by
    those packages.
    
    For more details, see kubernetes-sigs#783.
    ntoofu committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    32940b6 View commit details
    Browse the repository at this point in the history
  2. Update marker.Collector to fix bug of markers

    Markers are saved per `*ast.TypeSpec`, which is specific to `Package` object.
    `*ast.TypeSpec` in another `Package` object is different even when
    the `Package.ID` is the same, and so collected markers cannot be reused
    for another `Package` object.
    
    Therefore, `Package` itself is used as a key for cache of markers
    insetead of `Package.ID`.
    
    For more details about the bug, see kubernetes-sigs#783.
    ntoofu committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    b73fdf7 View commit details
    Browse the repository at this point in the history