Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Disable revision validation, for now
Browse files Browse the repository at this point in the history
Too much complexity and too much performance hit for pretty marginal
benefit, at least for MVP.
  • Loading branch information
sdboyer committed Jul 6, 2016
1 parent 8a9b88a commit c99a4d5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
20 changes: 12 additions & 8 deletions satisfy.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ func (s *solver) checkProject(a atomWithPackages) error {
s.logSolve(err)
return err
}
if err := s.checkRevisionExists(a, dep); err != nil {
s.logSolve(err)
return err
}
// TODO decide how to refactor in order to re-enable this. Checking for
// revision existence is important...but kinda obnoxious.
//if err := s.checkRevisionExists(a, dep); err != nil {
//s.logSolve(err)
//return err
//}
if err := s.checkPackageImportsFromDepExist(a, dep); err != nil {
s.logSolve(err)
return err
Expand Down Expand Up @@ -88,10 +90,12 @@ func (s *solver) checkPackage(a atomWithPackages) error {
s.logSolve(err)
return err
}
if err := s.checkRevisionExists(a, dep); err != nil {
s.logSolve(err)
return err
}
// TODO decide how to refactor in order to re-enable this. Checking for
// revision existence is important...but kinda obnoxious.
//if err := s.checkRevisionExists(a, dep); err != nil {
//s.logSolve(err)
//return err
//}
if err := s.checkPackageImportsFromDepExist(a, dep); err != nil {
s.logSolve(err)
return err
Expand Down
50 changes: 26 additions & 24 deletions solve_basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -898,30 +898,32 @@ var basicFixtures = []basicFixture{
"foo r123abc",
),
},
{
// Solve fails if revision constraint calls for a nonexistent revision
n: "fail on missing revision",
ds: []depspec{
mkDepspec("root 0.0.0", "bar *"),
mkDepspec("bar 1.0.0", "foo r123abc"),
mkDepspec("foo r123nomatch"),
mkDepspec("foo 1.0.0"),
mkDepspec("foo 2.0.0"),
},
errp: []string{"bar", "foo", "bar"},
},
{
// Solve fails if revision constraint calls for a nonexistent revision,
// even if rev constraint is specified by root
n: "fail on missing revision from root",
ds: []depspec{
mkDepspec("root 0.0.0", "foo r123nomatch"),
mkDepspec("foo r123abc"),
mkDepspec("foo 1.0.0"),
mkDepspec("foo 2.0.0"),
},
errp: []string{"foo", "root", "foo"},
},
// TODO decide how to refactor the solver in order to re-enable these.
// Checking for revision existence is important...but kinda obnoxious.
//{
//// Solve fails if revision constraint calls for a nonexistent revision
//n: "fail on missing revision",
//ds: []depspec{
//mkDepspec("root 0.0.0", "bar *"),
//mkDepspec("bar 1.0.0", "foo r123abc"),
//mkDepspec("foo r123nomatch"),
//mkDepspec("foo 1.0.0"),
//mkDepspec("foo 2.0.0"),
//},
//errp: []string{"bar", "foo", "bar"},
//},
//{
//// Solve fails if revision constraint calls for a nonexistent revision,
//// even if rev constraint is specified by root
//n: "fail on missing revision from root",
//ds: []depspec{
//mkDepspec("root 0.0.0", "foo r123nomatch"),
//mkDepspec("foo r123abc"),
//mkDepspec("foo 1.0.0"),
//mkDepspec("foo 2.0.0"),
//},
//errp: []string{"foo", "root", "foo"},
//},

// TODO add fixture that tests proper handling of loops via aliases (where
// a project that wouldn't be a loop is aliased to a project that is a loop)
Expand Down

0 comments on commit c99a4d5

Please sign in to comment.