I am using Solana Swift Package Dependency in my project and created the custom classes to use the features, imported the Solana module in those classes. But while running the CICD work flow ( GitHub actions ) in the build archive option getting the error error: no such module 'Solana' in the custom classes. I have also attached the screenshot regarding that. (It's working in manual archive from Xcode.)
I have also added clean and build command in the CICD workflow so can fetch this Package Dependency. I am fixing this error since many days but not getting success so please I would like your help.
Related
I have a go project where the common functionality is implemented , and there is an another go project for the API which uses common functionality from the first project. API project uses the common project , the imports are done from git hub.
I have added a new functionality to the common project and trying to access that new functionality in API project . I have pushed the code to my branch in git hub (new code not there in master branch of common project) . How can I import the new functionality to API project
you could import packages from specific branch like this
go get <path-to-repo>#<branch>
You're probably looking for go get -u github.com/yourcommonproject. From go help get:
The -u flag instructs get to update modules providing dependencies
of packages named on the command line to use newer minor or patch
releases when available.
The -x flag might also be useful in debugging:
The -x flag prints commands as they are executed. This is useful for
debugging version control commands when a module is downloaded directly
from a repository.
Useful relevant links:
https://golang.cafe/blog/how-to-upgrade-golang-dependencies.html
https://go.dev/doc/modules/managing-dependencies
I am trying to use bazel and gazelle tools to build a large Golang repository with pre-generated proto files. There are issues in using validate rules from envoyproxy in proto definitions and the bazel tool fails to build repository with this dependency. To reproduce the issue, I have created a github repository with a sample gRPC service. Without envoyproxy's validate proto dependency, the bazel tool succesfully builds the go packages. But introducing this dependency throws error.
Commands used to build the repository:
Generate proto files before building repository.
protoc -I=. -I ~/go/pkg/mod/github.com/envoyproxy/protoc-gen-validate#v0.6.1 --go_out=./../../../ --validate_out="lang=go:./../../../" --go-grpc_out=./../../../ ./protos/pinger/service.proto
Use gazelle to generate dependencies
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=deps.bzl%go_dependencies -build_file_proto_mode=disable_global -prune
Use gazelle to generate BUILD.bazel files
bazel run //:gazelle
Build pinger go binary
bazel build //cmd/pinger
The last build command throws an error
go/src/github.com/ihtkas/bazel-gazelle-ex/api/pinger/BUILD.bazel:3:11:
error loading package
'#com_github_envoyproxy_protoc_gen_validate//validate': Unable to find
package for #com_google_protobuf//:protobuf.bzl: The repository
'#com_google_protobuf' could not be resolved. and referenced by
'//api/pinger:pinger' ERROR: Analysis of target '//cmd/pinger:pinger'
failed; build aborted: Analysis failed
There is a github issue for the same. There are multiple suggestions and none of them seems to work for me. Explaining all the attempts will make this question useless. I need help in finding one solution which will solve the issue and build the repository successfully with bazel tool with pre-generated proto files. Based on suggestion, I will experiment and share the results here or in the same repository.
The issue can be fixed by following three steps.
-> Use specific commit from envoyproxy/protoc-gen-validate with the bazel naming convention fix
go get github.com/envoyproxy/protoc-gen-validate#4f41f10dde19ec4dd9dd8cf6f7537139f52fb58b
-> Include dependency for "com_google_protobuf" in bazel WORKSPACE
http_archive(
name = "com_google_protobuf",
sha256 = "d0f5f605d0d656007ce6c8b5a82df3037e1d8fe8b121ed42e536f569dec16113",
strip_prefix = "protobuf-3.14.0",
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v3.14.0.tar.gz",
],
)
load("#com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
-> Update io_bazel_rules_go to v0.28.0
All the fixes are included in a PR and merged to a branch "working" in the repository for reference.
I've been experimenting with using the new AWS CDK pipelines construct (https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html), and have successfully setup a couple of projects, including following the blog post announcement here: https://aws.amazon.com/blogs/developer/cdk-pipelines-continuous-delivery-for-aws-cdk-applications/.
However, as soon as I try to add a dependency to my lambdas the build fails with a
lib/lambda/handler.ts(2,24): error TS2307: Cannot find module 'stripe' or its corresponding type declarations.
I have installed a package.json file and the node_modules in the directory with the lambdas, tried zipping the lambdas and node_modules, tried uploading the zip file with the console, and tried getting the 'buildCommand' during the 'synthAction' step to install the dependencies. Nothing works.
The asset appears to get created in the cdk.out directory, and code changes are being uploaded, but node_modules themselves never get packaged along with the lambda functions.
I am using the 'SimpleSynthAction.standardNpmSynth' action, along with an 'npm run build' command in the 'buildCommand' step.
I've looked at Lambda can't find modules from outer folders when deployed with CDK, How to install dependencies of lambda functions upon cdk build with AWS CDK and https://github.com/aws-samples/aws-cdk-examples/issues/110#issuecomment-550506116 without luck.
What am I missing?
Looks like the issue has to do with bundling. I abandoned the 'all-in on CDK approach' and went back to using a SAM/CDK hybrid, but this new blog post suggests bundling is the answer.
https://aws.amazon.com/blogs/devops/building-apps-with-aws-cdk/
Specifically, it references this construct, which likely would have helped in my situation: https://docs.aws.amazon.com/cdk/api/latest/docs/aws-lambda-nodejs-readme.html
Something to try in future.
I have a quick question. Do you have a light-4j framework docker image hosted somewhere in which I can just add my API jar and run docker? I am getting a hard time running my APIs generated using codegen CLI in docker. It consistently gives me Error: Could not find or load main class com.networknt.server.Server error
Have you tried mvn clean install exec:exec? If you want to run with the jar file, you need to build with mvn clean install -Prelease to generate the final fat jar.
This is one of the features contributed by one of the members to speed up the testing cycle to avoid building all extra artifacts for each cycle. It might confuse new developers, though. The generated README.md has some information on how to build and start. Let me know it is not clear, and I will add extra info. When you run the build.sh to generate a docker image, it will be built with -Prelease in the script.
I'm trying to build dcm4chee-arc-cdi with code cloned from github: https://github.com/dcm4che/dcm4chee-arc-cdi
However when issuing the build command as described at the README.md
mvn install -D db=psql I get the following error:
[ERROR] Failed to execute goal on project dcm4chee-arc-conf: Could
not resolve dependencies for project
org.dcm4che.dcm4chee-arc:dcm4chee-arc-conf:jar:4.5.0-SNAPSHOT: The
following artifacts could not be resolved:
org.dcm4che:dcm4che-conf-api:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-conf-dicom:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-imageio:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-net-hl7:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-conf-api-hl7:jar:3.3.8-SNAPSHOT,
org.dcm4che:dcm4che-soundex:jar:3.3.8-SNAPSHOT,
org.dcm4che.dcm4chee-storage:dcm4chee-storage-service:jar:2.1.0-SNAPSHOT:
Failure to find org.dcm4che:dcm4che-conf-api:jar:3.3.8-SNAPSHOT in
http://www.dcm4che.org/maven2 was cached in the local repository
Does anybody have a suggestion on how to overcome this?
thanks
It seems that some other projects needed to be built before dcm4chee-arc-cdi.
Those were:
The dcm4che 3 library ( https://github.com:dcm4che/dcm4che )
The configuration layer ( https://github.com/dcm4che/dcm4chee-conf )
The storage layer ( https://github.com/dcm4che/dcm4chee-storage2 )
The monitoring framework ( https://github.com/dcm4che/dcm4chee-monitoring )
Seems the release repository (http://www.dcm4che.org/maven2/) is not holding the expected versions.
Take dcm4che-conf-api-hl7 for example. Its declared version (3.3.8-SNAPSHOT) does not exist in http://www.dcm4che.org/maven2/org/dcm4che/dcm4che-conf-api-hl7/
I guess the others are similar errors.
I suggest you contact one of the project's contributors like Umberto Cappellini
For a temp solution, you can edit the main pom.xml and replace the missing versions with actual versions you find in the repository I mentioned above.
I hope this helps.