Documentation
¶
Index ¶
- func AttachPackageResolvedPositions(g *sdk.Graph, projectDir string)
- type Detector
- func (d Detector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)
- func (d Detector) Descriptor() sdk.DetectorDescriptor
- func (d Detector) FallbackDetector() sdk.Detector
- func (d Detector) PackageManagerSupport() []sdk.PackageManagerSupport
- func (d Detector) Ready() bool
- func (d Detector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
- type NativeDetector
- func (d NativeDetector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)
- func (d NativeDetector) Descriptor() sdk.DetectorDescriptor
- func (d NativeDetector) FallbackDetector() sdk.Detector
- func (d NativeDetector) PackageManagerSupport() []sdk.PackageManagerSupport
- func (d NativeDetector) Ready() bool
- func (d NativeDetector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachPackageResolvedPositions ¶
AttachPackageResolvedPositions wires Package.resolved line numbers into the graph. Identity is matched case-insensitively because the SwiftPM detector lowercases names on graph construction.
Types ¶
type Detector ¶
Detector resolves Swift Package Manager dependency graphs from Package.resolved.
func (Detector) Applicable ¶
Applicable reports whether SwiftPM files are present.
func (Detector) Descriptor ¶
func (d Detector) Descriptor() sdk.DetectorDescriptor
Descriptor describes the SwiftPM detector.
func (Detector) FallbackDetector ¶
FallbackDetector returns the configured fallback detector.
func (Detector) PackageManagerSupport ¶
func (d Detector) PackageManagerSupport() []sdk.PackageManagerSupport
PackageManagerSupport returns SwiftPM package-manager discovery metadata.
func (Detector) ResolveGraph ¶
func (d Detector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
ResolveGraph resolves a SwiftPM dependency graph.
type NativeDetector ¶
NativeDetector resolves SwiftPM dependency graphs by running `swift package show-dependencies --format json`.
func (NativeDetector) Applicable ¶
func (d NativeDetector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)
Applicable reports whether SwiftPM files are present.
func (NativeDetector) Descriptor ¶
func (d NativeDetector) Descriptor() sdk.DetectorDescriptor
Descriptor describes the SwiftPM native detector.
func (NativeDetector) FallbackDetector ¶
func (d NativeDetector) FallbackDetector() sdk.Detector
FallbackDetector returns the configured fallback detector.
func (NativeDetector) PackageManagerSupport ¶
func (d NativeDetector) PackageManagerSupport() []sdk.PackageManagerSupport
PackageManagerSupport returns SwiftPM package-manager discovery metadata.
func (NativeDetector) Ready ¶
func (d NativeDetector) Ready() bool
Ready reports whether the swift binary is available.
func (NativeDetector) ResolveGraph ¶
func (d NativeDetector) ResolveGraph(_ context.Context, req sdk.DetectionRequest) (sdk.DetectionResult, error)
ResolveGraph resolves a SwiftPM dependency graph via swift package show-dependencies.