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

go/packages: correctly handle context canceled #483

Closed
wants to merge 1 commit into from

Commits on Apr 4, 2024

  1. go/packages: correctly handle context canceled

    If the context is canceled for packages.Load, the following log message is
    written numerous times to stderr and returned as a load error per-package:
    
    internal error: error "context canceled" (*errors.errorString) without
    position
    
    packages.Load now checks if the context was canceled while parsing files and
    returns nil, ctx.Err() if so.
    
    parseFiles now will not create unnecessary goroutines when ctx is canceled.
    
    ld.Config.Context is equivalent to ld.Context as Config is an embedded struct
    within loader. Use ld.Context to refer to ld.Config.Context for consistency.
    paralin committed Apr 4, 2024
    Copy the full SHA
    0d90ebb View commit details
    Browse the repository at this point in the history