Write tests and stub out core changes
This commit is contained in:
parent
0dcc164346
commit
eda744718e
@ -2688,6 +2688,8 @@ def define_package_versions_and_validate_preferences(
|
||||
if pkg_name not in packages_yaml or "version" not in packages_yaml[pkg_name]:
|
||||
continue
|
||||
|
||||
# TODO(psakiev) Need facts about versions
|
||||
# - requires_commit (associated with tag or branch)
|
||||
version_defs: List[GitOrStandardVersion] = []
|
||||
|
||||
for vstr in packages_yaml[pkg_name]["version"]:
|
||||
@ -3114,6 +3116,7 @@ def setup(
|
||||
specs = tuple(specs) # ensure compatible types to add
|
||||
|
||||
self.gen.h1("Reusable concrete specs")
|
||||
#TODO(psakiev) need fact spec has commit
|
||||
self.define_concrete_input_specs(specs, self.pkgs)
|
||||
if reuse:
|
||||
self.gen.fact(fn.optimize_for_reuse())
|
||||
@ -4187,6 +4190,7 @@ def execute_explicit_splices(self):
|
||||
|
||||
def _specs_with_commits(spec):
|
||||
spec.package.resolve_binary_provenance()
|
||||
# TODO(psakiev) assert commit is associated with ref
|
||||
|
||||
# method above is in charge of assigning the commit variant
|
||||
has_commit_var = "commit" in spec.variants
|
||||
|
@ -257,6 +257,8 @@ pkg_fact(Package, version_declared(Version)) :- pkg_fact(Package, version_declar
|
||||
{ attr("version", node(ID, Package), Version) : pkg_fact(Package, version_declared(Version)) }
|
||||
:- attr("node", node(ID, Package)).
|
||||
|
||||
% TODO(psakiev) need rule if spec has commit version must need commit
|
||||
|
||||
% A virtual package may or may not have a version, but never has more than one
|
||||
error(100, "Cannot select a single version for virtual '{0}'", Virtual)
|
||||
:- attr("virtual_node", node(ID, Virtual)),
|
||||
|
Loading…
Reference in New Issue
Block a user