Skip to content

Commit

Permalink
add dummy files to ensure c source is maintained
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanford committed Nov 10, 2020
1 parent f8ed007 commit 05a17bc
Show file tree
Hide file tree
Showing 55 changed files with 285 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/ccall/ast/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
69 changes: 69 additions & 0 deletions internal/ccall/build_cgo_hack.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// +build required

package ccall

// This file exists purely to prevent the golang toolchain from stripping
// away the c source directories and files when `go mod vendor` is used
// to populate a `vendor/` directory of a project depending on `goccy/go-graphviz`.
//
// How it works:
// - every directory which only includes c source files receives a dummy.go file.
// - every directory we want to preserve is included here as a _ import.
// - this file is given a build to exclude it from the regular build.
import (
// Prevent go tooling from stripping out the c source files.
_ "github.com/goccy/go-graphviz/internal"
_ "github.com/goccy/go-graphviz/internal/ccall/ast"
_ "github.com/goccy/go-graphviz/internal/ccall/cdt"
_ "github.com/goccy/go-graphviz/internal/ccall/cgraph"
_ "github.com/goccy/go-graphviz/internal/ccall/circogen"
_ "github.com/goccy/go-graphviz/internal/ccall/common"
_ "github.com/goccy/go-graphviz/internal/ccall/dotgen"
_ "github.com/goccy/go-graphviz/internal/ccall/edgepaint"
_ "github.com/goccy/go-graphviz/internal/ccall/expr"
_ "github.com/goccy/go-graphviz/internal/ccall/fdpgen"
_ "github.com/goccy/go-graphviz/internal/ccall/glcomp"
_ "github.com/goccy/go-graphviz/internal/ccall/gvc"
_ "github.com/goccy/go-graphviz/internal/ccall/gvpr"
_ "github.com/goccy/go-graphviz/internal/ccall/ingraphs"
_ "github.com/goccy/go-graphviz/internal/ccall/label"
_ "github.com/goccy/go-graphviz/internal/ccall/mingle"
_ "github.com/goccy/go-graphviz/internal/ccall/neatogen"
_ "github.com/goccy/go-graphviz/internal/ccall/ortho"
_ "github.com/goccy/go-graphviz/internal/ccall/osage"
_ "github.com/goccy/go-graphviz/internal/ccall/pack"
_ "github.com/goccy/go-graphviz/internal/ccall/patchwork"
_ "github.com/goccy/go-graphviz/internal/ccall/pathplan"
_ "github.com/goccy/go-graphviz/internal/ccall/rbtree"
_ "github.com/goccy/go-graphviz/internal/ccall/sfdpgen"
_ "github.com/goccy/go-graphviz/internal/ccall/sfio"
_ "github.com/goccy/go-graphviz/internal/ccall/sfio/Sfio_f"
_ "github.com/goccy/go-graphviz/internal/ccall/sparse"
_ "github.com/goccy/go-graphviz/internal/ccall/spine"
_ "github.com/goccy/go-graphviz/internal/ccall/topfish"
_ "github.com/goccy/go-graphviz/internal/ccall/twopigen"
_ "github.com/goccy/go-graphviz/internal/ccall/vmalloc"
_ "github.com/goccy/go-graphviz/internal/ccall/vpsc"
_ "github.com/goccy/go-graphviz/internal/ccall/vpsc/pairingheap"
_ "github.com/goccy/go-graphviz/internal/ccall/xdot"
_ "github.com/goccy/go-graphviz/internal/expat"
_ "github.com/goccy/go-graphviz/internal/plugin/core"
_ "github.com/goccy/go-graphviz/internal/plugin/devil"
_ "github.com/goccy/go-graphviz/internal/plugin/dot_layout"
_ "github.com/goccy/go-graphviz/internal/plugin/gd"
_ "github.com/goccy/go-graphviz/internal/plugin/gdiplus"
_ "github.com/goccy/go-graphviz/internal/plugin/gdk"
_ "github.com/goccy/go-graphviz/internal/plugin/glitz"
_ "github.com/goccy/go-graphviz/internal/plugin/gs"
_ "github.com/goccy/go-graphviz/internal/plugin/gtk"
_ "github.com/goccy/go-graphviz/internal/plugin/lasi"
_ "github.com/goccy/go-graphviz/internal/plugin/ming"
_ "github.com/goccy/go-graphviz/internal/plugin/neato_layout"
_ "github.com/goccy/go-graphviz/internal/plugin/pango"
_ "github.com/goccy/go-graphviz/internal/plugin/poppler"
_ "github.com/goccy/go-graphviz/internal/plugin/quartz"
_ "github.com/goccy/go-graphviz/internal/plugin/rsvg"
_ "github.com/goccy/go-graphviz/internal/plugin/visio"
_ "github.com/goccy/go-graphviz/internal/plugin/webp"
_ "github.com/goccy/go-graphviz/internal/plugin/xlib"
)
4 changes: 4 additions & 0 deletions internal/ccall/cdt/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/cgraph/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/circogen/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/common/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/dotgen/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/edgepaint/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/expr/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/fdpgen/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/glcomp/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/gvc/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/gvpr/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/ingraphs/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/label/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/mingle/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/neatogen/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/ortho/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/osage/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/pack/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/patchwork/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/pathplan/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/rbtree/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/sfdpgen/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/sfio/Sfio_f/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/sfio/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/sparse/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/spine/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/topfish/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/twopigen/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/vmalloc/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/vpsc/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/vpsc/pairingheap/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/ccall/xdot/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/expat/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/core/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/devil/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/dot_layout/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/gd/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/gdiplus/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/gdk/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/glitz/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/gs/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/gtk/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/lasi/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/ming/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/neato_layout/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/pango/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/poppler/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/quartz/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/rsvg/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/visio/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/webp/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy
4 changes: 4 additions & 0 deletions internal/plugin/xlib/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// +build required

// Package dummy prevents go tooling from stripping the c dependencies.
package dummy

0 comments on commit 05a17bc

Please sign in to comment.