Skip to content

Commit

Permalink
remove mixin for compile step, just copy paste code
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktaubeneck committed Jan 18, 2024
1 parent 99a6ddf commit 189bb67
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions sidecar/app/query/ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def build_command(self) -> LoggerOutputCommand:


@dataclass(kw_only=True)
class IPACompileStepMixin:
class IPACorrdinatorCompileStep(LoggerOutputCommandStep):
manifest_path: Path
target_path: Path
logger: loguru.Logger = field(repr=False)
Expand All @@ -123,9 +123,6 @@ def build_from_query(cls, query: IPAQuery):
logger=query.logger,
)


@dataclass(kw_only=True)
class IPACorrdinatorCompileStep(LoggerOutputCommandStep, IPACompileStepMixin):
def build_command(self) -> LoggerOutputCommand:
return LoggerOutputCommand(
cmd=f"cargo build --bin report_collector "
Expand All @@ -137,9 +134,22 @@ def build_command(self) -> LoggerOutputCommand:


@dataclass(kw_only=True)
class IPAHelperCompileStep(LoggerOutputCommandStep, IPACompileStepMixin):
class IPAHelperCompileStep(LoggerOutputCommandStep):
manifest_path: Path
target_path: Path
logger: loguru.Logger = field(repr=False)
status: ClassVar[Status] = Status.COMPILING

@classmethod
def build_from_query(cls, query: IPAQuery):
manifest_path = query.paths.repo_path / Path("Cargo.toml")
target_path = query.paths.repo_path / Path(f"target-{query.paths.commit_hash}")
return cls(
manifest_path=manifest_path,
target_path=target_path,
logger=query.logger,
)

def build_command(self) -> LoggerOutputCommand:
return LoggerOutputCommand(
cmd=f"cargo build --bin helper --manifest-path={self.manifest_path} "
Expand Down

0 comments on commit 189bb67

Please sign in to comment.