* Fix fetching a commit from a non-default branch
Previously, we would do a shallow clone of the default branch and then
attempt to checkout the commit. This doesn't work if the commit is not
on the default branch.
Also, allow specifying short hash (len 7).
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Remove left over dbg
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
---------
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Refactor diagnostics for warnings support
- Add render trait
- Render warnings after errors
- Reuse build code across build, layout
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Delete bundle
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix clippy lints
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add git ref metadata
3 stages to fetch_remote:
- Ensure remote is in cache
- Add appropriate symlinks
- Classify + store ref metadata
Some code cleanup:
- Factored out some git clone dupe code
- Centralized git operations in git.rs
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Warn on unstable refs
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add "-Dwarnings" flag to error on warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Warn on unstable refs in Module()
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add snapshot tests for warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix span detection for chained Module()
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add ResolveContext, dedup resolve code
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Use spec history for better alias warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add pcb.toml spans
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add type-erased error storage to Diagnostic
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix bug with load() span detection
The previous logic would just attempt to match by path, but if there are
multiple load() statements in a single file with the same path, then
find_load_span_for_path with always return the first.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Added diagnostics passes
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Add LSP-specific pass to filter out some warnings
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix rebase conflicts
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Fix unstable ref detection logic
If we clone by tag and the tag exists in the git repo, it's a stable
ref. Same with commit.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
---------
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Build after release in snapshot tests
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Copy all tracked files to release src/
Remove the filtering that I added, it's not needed. This can be further
simplified in the future by merging tracked_local_files into
path_to_spec.
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Do offline build of staged sources
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Do --offline builds in release + build tests
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Error on local deps outside workspace when vendoring
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
* Track local pcb.toml files
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
---------
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>