enum

package
v0.1.6-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheType

type CacheType int
const (
	CacheUnknown CacheType = iota
	CacheDisk
	CacheS3
)

func (CacheType) MarshalText

func (c CacheType) MarshalText() ([]byte, error)

func (*CacheType) UnmarshalText

func (c *CacheType) UnmarshalText(text []byte) error

type Family

type Family int
const (
	UnknownFamily Family = iota
	GNUFamily
	MSVCFamily
)

type InvocationMode

type InvocationMode int
const (
	UnknownMode InvocationMode = iota
	CompileMode
	PreprocessMode
	AssembleMode
	LinkMode
	DepOnlyMode
)

type Language

type Language int
const (
	Malformed Language = iota
	C
	CXX
)

type SourceMode

type SourceMode int

SourceMode is the single knob that picks both:

  1. How the local compile cache derives its key when no precomputed digest is available (i.e. the client-side path; the worker short-circuits via the digest the client sends).
  2. How the client ships source bytes to the worker when remote dispatch is enabled.

Both behaviors track the same value so a client's local cache and a worker-fronted shared cache (S3, paranoid mode) stay coherent — without that pairing, the two sides would derive different keys for the same translation unit and never see each other's entries.

"preprocessed" → SourceModePreprocessed:

Cache key: hash the bytes produced by the full preprocessor
(gcc -E / cl /E).
Dispatch (when remote): client preprocesses and ships the
resulting bytes inline in CompileRequest. Works on every
workload that produces a self-contained translation unit.

"cas" → SourceModeCAS:

Cache key: hash the dep closure (gcc -M / cl /showIncludes).
No macro expansion, no preprocessed-text output — much cheaper
than the preprocessed-bytes hash.
Dispatch (when remote): client builds a content-addressed
manifest, probes the worker's compile cache, and (on miss)
ships only the missing source blobs via UploadBlobs. Required
for workloads where preprocessed output isn't self-contained
(e.g. GAS .S files with .incbin). See docs/plan/cas.md.

Maps 1:1 to protocol.SourceMode but lives in `enum` so the config package can hold it without dragging the generated proto into its import graph.

const (
	SourceModeUnspecified SourceMode = iota
	SourceModePreprocessed
	SourceModeCAS
)

func (SourceMode) MarshalText

func (m SourceMode) MarshalText() ([]byte, error)

func (*SourceMode) UnmarshalText

func (m *SourceMode) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL