Skip to content

Commit

Permalink
Merge pull request #344 from gucio321/fix-vendoring
Browse files Browse the repository at this point in the history
improve dummy system so that vendoring should work now
  • Loading branch information
gucio321 authored Oct 3, 2024
2 parents 8a4f9f5 + 1808a80 commit a21d0ec
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 57 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ update: setup

# dummy creates dummy.go files to baypass GO vendor policy that excludes everything that has no .go files (including our C source).
define dummy
echo -e "// +build rquired\n\npackage imgui\n\nimport (\n" > dummy.go
echo -e "//go:build required\n// +build rquired\n\npackage imgui\n\nimport (\n" > dummy.go
for i in `find cwrappers -type f \( -name "*.h" -o -name "*.cpp" \) -exec dirname {} \; | sort -u`; do \
cp templates/dummy.go.template $$i/dummy.go; \
echo -e "\t\"github.com/AllenDang/cimgui-go/$$i\"" >> dummy.go; \
echo -e "\t_ \"github.com/AllenDang/cimgui-go/$$i\"" >> dummy.go; \
done
echo ")" >> dummy.go
endef
Expand Down
110 changes: 55 additions & 55 deletions dummy.go
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
// +build rquired
//go:build required
// +build required

package imgui

import (

"github.com/AllenDang/cimgui-go/cwrappers"
"github.com/AllenDang/cimgui-go/cwrappers/imgui"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/backends"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_allegro5"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_android_opengl3"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_opengl2"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_opengl3"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_vulkan"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_wgpu"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glut_opengl2"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_null"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_directx11"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_opengl2"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_opengl3"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_sdlrenderer2"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_vulkan"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl3_opengl3"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl3_sdlrenderer3"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx10"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx11"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx12"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx9"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_opengl3"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/libs/emscripten"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/libs/glfw/include/GLFW"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/libs/usynergy"
"github.com/AllenDang/cimgui-go/cwrappers/imgui_markdown"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/cpp"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/fonts"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/freetype"
"github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/single_file"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/example"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/b64"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/cgns"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/chartdir"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/cityhash"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/clapack"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/freeimage"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/gettimeofday"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/graphicsmagick"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/gts"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/igraph"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libaiff"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libmspack"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libu2f-server"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libuuid"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/modp-base64"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/openblas"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/ragel"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/project"
"github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/scripts/test_ports/vcpkg-ci-soci/project"
"github.com/AllenDang/cimgui-go/cwrappers/implot"
_ "github.com/AllenDang/cimgui-go/cwrappers"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/backends"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_allegro5"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_android_opengl3"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_opengl2"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_opengl3"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_vulkan"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glfw_wgpu"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_glut_opengl2"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_null"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_directx11"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_opengl2"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_opengl3"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_sdlrenderer2"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl2_vulkan"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl3_opengl3"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_sdl3_sdlrenderer3"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx10"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx11"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx12"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_directx9"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/example_win32_opengl3"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/libs/emscripten"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/libs/glfw/include/GLFW"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/examples/libs/usynergy"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/cpp"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/fonts"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/freetype"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui/misc/single_file"
_ "github.com/AllenDang/cimgui-go/cwrappers/imgui_markdown"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/example"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/b64"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/cgns"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/chartdir"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/cityhash"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/clapack"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/freeimage"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/gettimeofday"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/graphicsmagick"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/gts"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/igraph"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libaiff"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libmspack"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libu2f-server"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/libuuid"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/modp-base64"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/openblas"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/ports/ragel"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/scripts/test_ports/vcpkg-ci-ankurvdev-embedresource/project"
_ "github.com/AllenDang/cimgui-go/cwrappers/imnodes/vcpkg/scripts/test_ports/vcpkg-ci-soci/project"
_ "github.com/AllenDang/cimgui-go/cwrappers/implot"
)
1 change: 1 addition & 0 deletions dummy2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package dummy
8 changes: 8 additions & 0 deletions imgui/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build rquired
// +build rquired

package imgui

import (
_ "github.com/AllenDang/cimgui-go"
)
8 changes: 8 additions & 0 deletions immarkdown/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build rquired
// +build rquired

package imgui

import (
_ "github.com/AllenDang/cimgui-go"
)
8 changes: 8 additions & 0 deletions imnodes/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build rquired
// +build rquired

package imgui

import (
_ "github.com/AllenDang/cimgui-go"
)
8 changes: 8 additions & 0 deletions implot/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build rquired
// +build rquired

package imgui

import (
_ "github.com/AllenDang/cimgui-go"
)

0 comments on commit a21d0ec

Please sign in to comment.