Skip to content

Commit

Permalink
Move core and plugins to components folder
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Apr 17, 2023
1 parent bc5345a commit b31b530
Show file tree
Hide file tree
Showing 46 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }},iotaledger/wasp:latest
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILD_LD_FLAGS=-X=github.com/iotaledger/wasp/core/app.Version=${{ steps.tagger.outputs.tag }}
BUILD_LD_FLAGS=-X=github.com/iotaledger/wasp/components/app.Version=${{ steps.tagger.outputs.tag }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG GOLANG_IMAGE_TAG=1.20-bullseye
# Build stage
FROM golang:${GOLANG_IMAGE_TAG} AS build
ARG BUILD_TAGS=rocksdb
ARG BUILD_LD_FLAGS="--X=github.com/iotaledger/wasp/core/app.Version=v0.0.0-testing"
ARG BUILD_LD_FLAGS="--X=github.com/iotaledger/wasp/components/app.Version=v0.0.0-testing"

LABEL org.label-schema.description="Wasp"
LABEL org.label-schema.name="iotaledger/wasp"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.noncached
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG GOLANG_IMAGE_TAG=1.20-bullseye
# Build stage
FROM golang:${GOLANG_IMAGE_TAG} AS build
ARG BUILD_TAGS=rocksdb
ARG BUILD_LD_FLAGS="--X=github.com/iotaledger/wasp/core/app.Version=v0.0.0-testing"
ARG BUILD_LD_FLAGS="--X=github.com/iotaledger/wasp/components/app.Version=v0.0.0-testing"

LABEL org.label-schema.description="Wasp"
LABEL org.label-schema.name="iotaledger/wasp"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT_REF_TAG := $(shell git describe --tags)
BUILD_TAGS = rocksdb
BUILD_LD_FLAGS = "-X=github.com/iotaledger/wasp/core/app.Version=$(GIT_REF_TAG)"
BUILD_LD_FLAGS = "-X=github.com/iotaledger/wasp/components/app.Version=$(GIT_REF_TAG)"
DOCKER_BUILD_ARGS = # E.g. make docker-build "DOCKER_BUILD_ARGS=--tag wasp:devel"

#
Expand Down
28 changes: 14 additions & 14 deletions core/app/app.go → components/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ import (
"github.com/iotaledger/hive.go/app"
"github.com/iotaledger/hive.go/app/components/profiling"
"github.com/iotaledger/hive.go/app/components/shutdown"
"github.com/iotaledger/wasp/core/chains"
"github.com/iotaledger/wasp/core/database"
"github.com/iotaledger/wasp/core/dkg"
"github.com/iotaledger/wasp/core/logger"
"github.com/iotaledger/wasp/core/nodeconn"
"github.com/iotaledger/wasp/core/peering"
"github.com/iotaledger/wasp/core/processors"
"github.com/iotaledger/wasp/core/publisher"
"github.com/iotaledger/wasp/core/registry"
"github.com/iotaledger/wasp/core/users"
"github.com/iotaledger/wasp/core/wasmtimevm"
"github.com/iotaledger/wasp/components/chains"
"github.com/iotaledger/wasp/components/database"
"github.com/iotaledger/wasp/components/dkg"
"github.com/iotaledger/wasp/components/logger"
"github.com/iotaledger/wasp/components/nodeconn"
"github.com/iotaledger/wasp/components/peering"
"github.com/iotaledger/wasp/components/processors"
"github.com/iotaledger/wasp/components/profilingrecorder"
"github.com/iotaledger/wasp/components/prometheus"
"github.com/iotaledger/wasp/components/publisher"
"github.com/iotaledger/wasp/components/registry"
"github.com/iotaledger/wasp/components/users"
"github.com/iotaledger/wasp/components/wasmtimevm"
"github.com/iotaledger/wasp/components/webapi"
"github.com/iotaledger/wasp/packages/toolset"
"github.com/iotaledger/wasp/plugins/profilingrecorder"
"github.com/iotaledger/wasp/plugins/prometheus"
"github.com/iotaledger/wasp/plugins/webapi"
)

var (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/components/webapi"
"github.com/iotaledger/wasp/packages/authentication"
"github.com/iotaledger/wasp/plugins/webapi"
)

func TestInternalServerErrors(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/iotaledger/wasp/core/app"
"github.com/iotaledger/wasp/components/app"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/gendoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cd tools/gendoc
GIT_REF_TAG="$(git describe --tags)"

BUILD_TAGS=rocksdb
BUILD_LD_FLAGS="-X=github.com/iotaledger/wasp/core/app.Version=${GIT_REF_TAG}"
BUILD_LD_FLAGS="-X=github.com/iotaledger/wasp/components/app.Version=${GIT_REF_TAG}"

go run -tags ${BUILD_TAGS} -ldflags ${BUILD_LD_FLAGS} main.go

Expand Down
2 changes: 1 addition & 1 deletion tools/api-gen/apigen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")

GIT_REF_TAG=$(git describe --tags)
BUILD_LD_FLAGS="-X=github.com/iotaledger/wasp/core/app.Version=$GIT_REF_TAG"
BUILD_LD_FLAGS="-X=github.com/iotaledger/wasp/components/app.Version=$GIT_REF_TAG"

# To generate with the current commit version:
# go run -ldflags="$BUILD_LD_FLAGS" ./main.go "$@"
Expand Down
4 changes: 2 additions & 2 deletions tools/api-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/pangpanglabs/echoswagger/v2"

"github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/wasp/core/app"
"github.com/iotaledger/wasp/components/app"
"github.com/iotaledger/wasp/components/webapi"
"github.com/iotaledger/wasp/packages/authentication"
"github.com/iotaledger/wasp/packages/cryptolib"
v2 "github.com/iotaledger/wasp/packages/webapi"
"github.com/iotaledger/wasp/plugins/webapi"
)

type NodeIdentityProviderMock struct{}
Expand Down
2 changes: 1 addition & 1 deletion tools/evm-server/waypoint.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ app "wasp-evm-server" {
context = "../.."
build_args = {
GOLANG_IMAGE_TAG = "1.20-bullseye"
BUILD_LD_FLAGS = "-X=github.com/iotaledger/wasp/core/app.Version=${gitreftag()}"
BUILD_LD_FLAGS = "-X=github.com/iotaledger/wasp/components/app.Version=${gitreftag()}"
BUILD_TARGET = "./tools/wasp-cli"
FINAL_BINARY = "wasp-cli"
}
Expand Down
2 changes: 1 addition & 1 deletion tools/gendoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/iotaledger/hive.go/app"
"github.com/iotaledger/hive.go/apputils/config"
waspApp "github.com/iotaledger/wasp/core/app"
waspApp "github.com/iotaledger/wasp/components/app"
)

func createMarkdownFile(app *app.App, markdownHeaderPath string, markdownFilePath string, ignoreFlags map[string]struct{}, replaceTopicNames map[string]string) {
Expand Down
2 changes: 1 addition & 1 deletion tools/local-setup/build_container.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rem export variables for the build process
set BUILD_TAGS=rocksdb
for /f %%f in ('git describe --tags') do set BUILD_LD_FLAGS=-X=github.com/iotaledger/wasp/core/app.Version=%%f
for /f %%f in ('git describe --tags') do set BUILD_LD_FLAGS=-X=github.com/iotaledger/wasp/components/app.Version=%%f

rem build the wasp container
docker compose build wasp
2 changes: 1 addition & 1 deletion tools/local-setup/build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GIT_REF_TAG="$(git describe --tags)"

# export variables for the build process
export BUILD_TAGS=rocksdb
export BUILD_LD_FLAGS="-X=github.com/iotaledger/wasp/core/app.Version=${GIT_REF_TAG}"
export BUILD_LD_FLAGS="-X=github.com/iotaledger/wasp/components/app.Version=${GIT_REF_TAG}"

# build the wasp container
docker compose build wasp
2 changes: 1 addition & 1 deletion tools/local-setup/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
dockerfile: Dockerfile.noncached
args:
BUILD_TAGS: "${BUILD_TAGS:-rocksdb}"
BUILD_LD_FLAGS: "${BUILD_LD_FLAGS:--X=github.com/iotaledger/wasp/core/app.Version=v0.0.0-testing}"
BUILD_LD_FLAGS: "${BUILD_LD_FLAGS:--X=github.com/iotaledger/wasp/components/app.Version=v0.0.0-testing}"
ulimits:
nofile:
soft: 16384
Expand Down
6 changes: 3 additions & 3 deletions tools/wasp-cli/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ builds:
- id: wasp-cli-linux-amd64
binary: wasp-cli
ldflags:
- -s -w -X=github.com/iotaledger/wasp/core/app.Version={{ .Summary }}
- -s -w -X=github.com/iotaledger/wasp/components/app.Version={{ .Summary }}
main: main.go
dir: ./tools/wasp-cli
goos:
Expand All @@ -25,7 +25,7 @@ builds:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
ldflags:
- -s -w -X=github.com/iotaledger/wasp/core/app.Version={{ .Summary }}
- -s -w -X=github.com/iotaledger/wasp/components/app.Version={{ .Summary }}
main: main.go
dir: ./tools/wasp-cli
goos:
Expand All @@ -41,7 +41,7 @@ builds:
- CC=/usr/bin/x86_64-w64-mingw32-gcc-posix
- CXX=/usr/bin/x86_64-w64-mingw32-g++-posix
ldflags:
- -s -w -X=github.com/iotaledger/wasp/core/app.Version={{ .Summary }}
- -s -w -X=github.com/iotaledger/wasp/components/app.Version={{ .Summary }}
main: main.go
dir: ./tools/wasp-cli
goos:
Expand Down
2 changes: 1 addition & 1 deletion tools/wasp-cli/cli/cliclients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/iotaledger/wasp/clients/apiextensions"
"github.com/iotaledger/wasp/clients/chainclient"
"github.com/iotaledger/wasp/clients/scclient"
"github.com/iotaledger/wasp/core/app"
"github.com/iotaledger/wasp/components/app"
"github.com/iotaledger/wasp/packages/isc"
"github.com/iotaledger/wasp/packages/l1connection"
"github.com/iotaledger/wasp/tools/wasp-cli/cli/config"
Expand Down
2 changes: 1 addition & 1 deletion tools/wasp-cli/cli/init/checkversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/iotaledger/wasp/core/app"
"github.com/iotaledger/wasp/components/app"
"github.com/iotaledger/wasp/tools/wasp-cli/cli/cliclients"
"github.com/iotaledger/wasp/tools/wasp-cli/log"
)
Expand Down
2 changes: 1 addition & 1 deletion tools/wasp-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
goversion "github.com/hashicorp/go-version"
"github.com/spf13/cobra"

"github.com/iotaledger/wasp/core/app"
"github.com/iotaledger/wasp/components/app"
"github.com/iotaledger/wasp/tools/wasp-cli/authentication"
"github.com/iotaledger/wasp/tools/wasp-cli/chain"
"github.com/iotaledger/wasp/tools/wasp-cli/cli/config"
Expand Down

0 comments on commit b31b530

Please sign in to comment.