Compare commits

..

2 Commits

Author SHA1 Message Date
d78bfcc408 Bump version from 0.5.0 to 0.5.1 in pyproject.toml
All checks were successful
Build Wheels / build (push) Successful in 3m38s
2025-04-27 18:40:23 +00:00
8ed550f451 Defers project loading to execution phase
Removes project loading from command initialization and shifts it to the execution phase for better resource management and initialization performance.

Improves flexibility by ensuring the project is only loaded when needed.
2025-04-27 18:39:58 +00:00
5 changed files with 4 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "hdlbuild"
version = "0.5.0"
version = "0.5.1"
description = "Flexible FPGA Build System"
authors = ["0xMax42 <Mail@0xMax42.io>"]
license = "MIT"

View File

@@ -6,7 +6,6 @@ from hdlbuild.utils.project_loader import load_project_config
class BuildCommand:
def __init__(self):
self.console_utils = ConsoleUtils("hdlbuild")
self.project = load_project_config()
def register(self, subparsers):
parser = subparsers.add_parser("build", help="Start the build process")
@@ -20,6 +19,7 @@ class BuildCommand:
def execute(self, args):
"""Starts the build process."""
self.project = load_project_config()
if args.target == "synth":
self.console_utils.print("Starting synth process...")
ensure_directories_exist(True)

View File

@@ -5,7 +5,6 @@ from hdlbuild.utils.project_loader import load_project_config
class DepCommand:
def __init__(self):
self.console_utils = ConsoleUtils("hdlbuild")
self.project = load_project_config()
def register(self, subparsers):
parser = subparsers.add_parser("dep", help="Start the dependencies process")
@@ -13,5 +12,6 @@ class DepCommand:
def execute(self, args):
"""Starts the dependencies process."""
self.project = load_project_config()
self.console_utils.print("Starting dependencies process...")
DependencyResolver(self.project).resolve_all()

View File

@@ -2,12 +2,10 @@ from pathlib import Path
import shutil
from hdlbuild.dependencies.resolver import DependencyResolver
from hdlbuild.utils.console_utils import ConsoleUtils
from hdlbuild.utils.project_loader import load_project_config
class InitCommand:
def __init__(self):
self.console_utils = ConsoleUtils("hdlbuild")
self.project = load_project_config()
def register(self, subparsers):
parser = subparsers.add_parser("init", help="Initialize a new HDLBuild project")

View File

@@ -5,7 +5,6 @@ from hdlbuild.utils.project_loader import load_project_config
class TestCommand:
def __init__(self):
self.console_utils = ConsoleUtils("hdlbuild")
self.project = load_project_config()
def register(self, subparsers):
parser = subparsers.add_parser("test", help="Start the Tests process")
@@ -18,6 +17,7 @@ class TestCommand:
def execute(self, args):
"""Starts the test process."""
self.project = load_project_config()
self.console_utils.print("Starting test process...")
build_testbench(self.project, args.target)
run_testbench(self.project, args.target)