Skip to content

Commit

Permalink
migrate away from bazel
Browse files Browse the repository at this point in the history
Change-Id: Iff1666721e931963b7cf18fd403b5b76bad8837e
  • Loading branch information
fionera committed Jan 15, 2024
1 parent c40ffa0 commit 17c156b
Show file tree
Hide file tree
Showing 132 changed files with 569 additions and 1,920 deletions.
10 changes: 0 additions & 10 deletions .bash_completions

This file was deleted.

7 changes: 0 additions & 7 deletions .bazelrc

This file was deleted.

1 change: 0 additions & 1 deletion .bazelversion

This file was deleted.

39 changes: 0 additions & 39 deletions BUILD

This file was deleted.

136 changes: 0 additions & 136 deletions WORKSPACE

This file was deleted.

46 changes: 46 additions & 0 deletions cmd/gendocs/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package main

import (
"fmt"
"log"

"cuelang.org/go/cue"
"cuelang.org/go/cue/ast"
"cuelang.org/go/cue/cuecontext"
"cuelang.org/go/cue/load"
)

var skeletonOptions = []cue.Option{
cue.Attributes(true),
cue.Concrete(false),
cue.Definitions(false),
cue.DisallowCycles(true),
cue.Docs(true),
cue.Hidden(true),
cue.Optional(true),
}

func main() {
ctx := cuecontext.New()
bis := load.Instances([]string{}, &load.Config{Dir: "../.."})
for _, bi := range bis {
if bi.Err != nil {
log.Fatal("Error during loading", "entrypoints", "error", bi.Err)
}
orgCue := ctx.BuildInstance(bi)
orgNode := orgCue.Syntax(skeletonOptions...)
beforeNode := func(v ast.Node) bool {
return true
}

debugNode := func(v ast.Node) {
for _, comment := range ast.Comments(v) {
for _, lines := range comment.List {
fmt.Println("debugging ast", "comment", lines.Text, "name", ast.Name(v))
}
}
}

ast.Walk(orgNode, beforeNode, debugNode)
}
}
9 changes: 0 additions & 9 deletions cmd/helloworld/BUILD

This file was deleted.

13 changes: 0 additions & 13 deletions cmd/helloworld/helloworld.go

This file was deleted.

14 changes: 0 additions & 14 deletions cmd/risinfo/BUILD.bazel

This file was deleted.

6 changes: 6 additions & 0 deletions cmd/risinfo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# risinfo

risinfo serves a prefix -> origin mapping derived from routeviews.org RIB dumps as a ClickHouse dictionary.
This data is much more recent than Maxmind ASN data.

It's quite expensive to fetch and process a full internet routing table (~60s). In the future, we may introduce a layer of server-side caching with prebuilt lookup tables available for download.
5 changes: 0 additions & 5 deletions cmd/risinfo/risinfo.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// risinfo serves a prefix -> origin mapping derived from routeviews.org RIB dumps as a ClickHouse dictionary.
// This data is much more recent than Maxmind ASN data.
//
// It's quite expensive to fetch and process a full internet routing table (~60s). In the future, we may introduce
// a layer of server-side caching with prebuilt lookup tables available for download.
package main

import (
Expand Down
Loading

0 comments on commit 17c156b

Please sign in to comment.