It is turned off by default and can only be
enabled by changing the code and doing a new build. This will help us
test out the new feature without a long-term branch.
This change modifies the LATEST field in status from always being a
revision to the same type as of the VERSION field.
If VERSION is a semver version, the LATEST would have the latest semver
version of the project constrained by the effective constraint.
If VERSION is a branch version, the LATEST would have the latest
revision of that branch.
* make importers error tolerant
- root_analyzer.go: Log a warning on encountering an unrecoverable error during
import of external config and proceed with the import for other packages.
Do not return error from private func `importManifestAndLock`.
internal/importers:
- base/importer.go:
- `loadPackages`: Do not return error. If `SourceManager.DeduceProjectRoot`
fails to determine the project root, log a warning and continue with the
rest of the imported packages.
- `ImportPackages`: Do not return error. When constraint resolution from the
lock hint fails, only log a warning.
- Importer implementations:
- Return an error from `Import` only for catastrophic failures(ex: yaml
parsing failed).
- `load`: Make it more error tolerant. Log warnings only for any of the
following scenarios:
- When and if a lock file, separate from the dependency file is present,
like, in the case of glide, and parsing fails. Continue with the import
as if the lock file was not present.
- If import packages are parsed line by line like in the case of glock,
and one of the line could not be parsed.
- `convert`: Do not return an error. Log warnings only for any of the
following scenarios:
- Expected field, such as `package` for an entry in `glide.yaml>imports`
is not present.
- Package was specified but the contraint could not be found.
* update importer tests
* improve importer warning msgs
Address feedback from @carolynvs
* add tests for importer failure scenarios
- internal/importers/base/importer_test.go:
- Check for warning when an invalid project is present whose project root
cannot be parsed.
- Check for warning when lock hint cannot be resolved correctly and the
constraint cannot be applied.
- Integration test for malformed external config(glide.yaml)
* tweak importer warnings
- {package => project}
- Improve warning message when no constraint is found for the package being
imported.
* update changelog
source
- main.go: Read and use env var `DEPCACHEDIR` for instantiating dep context.
- context.go:
- Add field `Cachedir` to struct `Ctx`. This holds the value of env var
`DEPCACHEDIR`.
- Use `Ctx.Cachedir` while instantiating `gps.SourceMgr` if present, fallback
to `$GOPATH/pkg/dep` otherwise.
- source_manager.go: Add a getter func `Cachedir` to facilitate testing in
`context_test.go`.
test
- context_test.go Add test to check `gps.SourceMgr` is instantiated with
appropriate `cachedir`.
- integration_test.go: Add test to check environment variable `DEPCACHEDIR` is
loaded and used if present.
misc
- update changelog
Move govendor files into importers pkg
Expose the base importer's source manager
It is used by the govendor importer to detect ignored packaegs
Update govendor importer to use base importer
Document exported members
Remove unused testdata
Import ignores with wildcards
Add govendor support to changelog
Do not import vendored sources
Don't require a revision to import govendor config
There are valid govendor configs in the wild that do not have a revision
set, essentially requiring the package but not locking to a revision. We
should allow that and not stop the import.