I am trying to install a bundle which depends on another.
When I attempt to install it via maven (where it is stored), I get the following error:
install -s mvn:com.mycompany.er/ER_api/0.1218.0
Bundle ID: 544
Error executing command: Error installing bundles:
Unable to start bundle mvn:com.mycompany.er/ER_api/0.1218.0: Unresolved constraint in bundle com.mycompany.er.ER_api [544]:
Unable to resolve 544.0: missing requirement [544.0] osgi.wiring.package; (&(osgi.wiring.package=com.mycompany.application.errors)(version>=0.145.0)(!(version>=1.0.0)))
The bundle shows up as installed:
[ 544] [Installed ] [ ] [ ] [ 60] ER_api (0.1218.0)
Listing the headers for the ER_api bundle show that it does indeed depend on com.mycompany.application.errors, and that shows up in red.
Import-Package =
....
com.mycompany.application.errors;version="[0.145,1)",
According to my understanding the version required is greater than or equal to 0.145, but less than 1. So version 0.145.0 should meet this criteria.
The package in question com.mycompany.application.errors is available in the bundle APPLICATION_app_common, which appears to be installed and active:
[ 540] [Active ] [ ] [ ] [ 60] APPLICATION_app_common (0.145.0)
Checking whether the package is exported shows that it is:
JBossFuse:karaf#root> headers 540
APPLICATION_app_common (540)
----------------------------
Manifest-Version = 1.0
Bnd-LastModified = 1459506884903
Tool = Bnd-1.50.0
....
Export-Package =
com.mycompany.application;version=0.145.0,
com.mycompany.application.errors;
uses:="javax.xml.bind.annotation,
javax.ws.rs.core,
com.mycompany.application.smapi";
version=0.145.0,
The only thing that complicates matters is that it's not a direct dependency, it's a transitive dependency. ER_api depends on ER_transactions_log, which depends on APPLICATION_app_common. I have the latest version of ER_transactions_log installed and active:
[ 511] [Active ] [ ] [ ] [ 60] ER_transactions_log (0.45.0.SNAPSHOT)
I can't understand why it can't see the exported package. APPLICATION_app_common clearly lists the package in its Export-Package list.
How do I debug this?
Related
Xcode 12.5 on MBP with M1 fails resolving package dependency with .systemLibrary target. Running Xcode without Rosseta.
The project is setup with 2 spm packages. Both of them added to the project .xcworkspace and only one of them linked within the app. Both packages are local dependencies.
A package has B package as dependency and B package has libgit2 as .systemLibrary dependency.
Then, if I open the project, Xcode can't find pkg-config and then not resolves libgit2 dependency.
This doesn't happens if I generate the A pbxproj with swift package generate-xcodeproj, in this case, the project resolves fine and I can build it without any problem.
The A Package.swift is:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "A",
platforms: [
.macOS(.v11)
],
products: [
.library(
name: "A",
targets: ["A"]
),
],
dependencies: [
.package(path: "../B")
],
targets: [
.target(
name: "A",
dependencies: ["B"]
),
.testTarget(
name: "ATests",
dependencies: ["A"]
),
]
)
The B Package.swift is:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "B",
platforms: [
.macOS(.v11)
],
products: [
.library(
name: "B",
targets: ["B"]
)
],
dependencies: [],
targets: [
.systemLibrary(
name: "Clibgit2",
pkgConfig: "libgit2",
providers: [
.brew(["libgit2"])
]
),
.target(
name: "B",
dependencies: [
.target(name: "Clibgit2")
]
),
.testTarget(
name: "BTests",
dependencies: ["B"]
)
]
)
The Clibgit2 target is well configured with the module.modulemap and shim.h files.
I checked pkg-config is installed and has the libgit2 package info with pkg-config --list
Also I opened the project on an intel mac and is working fine.
libgit2 is installed by brew.
Thanks to NeoNach!!
Xcode is only looking at /opt/brew and /usr/local. The homebrew location for M1 chips is on /opt/homebrew so you can set a custom path using com.apple.dt.Xcode.IDEHombrePrefixPath.
defaults write com.apple.dt.Xcode IDEHomebrewPrefixPath /opt/homebrew
Tweet ref: https://twitter.com/NeoNacho/status/1412514541343166467
We have a company-created Maven plugin that requires many (40+) defined profiles.
All those profiles are alphabetically listed in the Profiles folder in the Maven tab in IntelliJ IDEA.
Is it possible to create subfolders in the Profiles folder?
Instead of seeing:
V Profiles
[ ] profile_one
[ ] profile_two
[ ] profile_three
:
[ ] profile_forty
I'd like to have:
V Profiles
> Profile_subfolder_A
V Profile_subfolder_B
[ ] profile_five
[ ] profile_six
> Profile_subfolder_C
:
There is no such groupping in IDE. There are related request you can vote for:
IDEA-142807, IDEA-81772.
My project structure
/PROJECT
WORKSPACE
BUILD
third_party
tensorflow <-- cloned repository
my_files
BUILD
In WORKSPACE file i added this
local_repository(
name = "tensorflow",
path = "third_party/tensorflow",
)
load("#tensorflow//tensorflow:workspace3.bzl", "workspace")
workspace()
load("#tensorflow//tensorflow:workspace2.bzl", "workspace")
workspace()
load("#tensorflow//tensorflow:workspace1.bzl", "workspace")
workspace()
load("#tensorflow//tensorflow:workspace0.bzl", "workspace")
workspace()
Initially, the following was already written in the file
#Tensorflow repo should always go after the other external dependencies.
# 2020-10-30
_TENSORFLOW_GIT_COMMIT = "84384703c0d8b502e33ff6fd7eefd219dca5ff8e"
_TENSORFLOW_SHA256= "23fb322fc15a20f7a7838d9a31f8b16f60700a494ea654311a0aa8621769df98"
http_archive(
name = "org_tensorflow",
urls = [
"https://github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT,
],
patches = [
"#//third_party:org_tensorflow_compatibility_fixes.diff",
],
patch_args = [
"-p1",
],
strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT,
sha256 = _TENSORFLOW_SHA256,
)
load("#org_tensorflow//tensorflow:workspace.bzl", "tf_workspace")
tf_workspace(tf_repo_name = "org_tensorflow")
Than in my_files/BUILD i wrote following
objc_library(
deps = [
"#tensorflow//tensorflow/lite/objc:TensorFlowLite",
],
)
When building, I get the following error
ERROR: file '_middlemen/TensorFlowLiteCMetal-ObjcCppSemantics_build_arch_ios-arm64-min10.0-
applebin_ios-ios_arm64-dbg_with_suffix__non_objc_arc' is generated by these conflicting actions:
Label: #tensorflow//tensorflow/lite/delegates/gpu:metal_delegate,
#org_tensorflow//tensorflow/lite/delegates/gpu:metal_delegate
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException:
com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for
_middlemen/TensorFlowLiteCMetal-ObjcCppSemantics_build_arch_ios-arm64-min10.0-applebin_ios-
ios_arm64-dbg_with_suffix__non_objc_arc, previous action: ObjcCppSemantics_build_arch_ios-
arm64-min10.0-applebin_ios-ios_arm64-dbg_with_suffix__non_objc_arc for #org_tensorflow//tensorflow/lite/delegates/gpu:metal_delegate, attempted action:
ObjcCppSemantics_build_arch_ios-arm64-min10.0-applebin_ios-ios_arm64-
dbg_with_suffix__non_objc_arc for #tensorflow//tensorflow/lite/delegates/gpu:metal_delegate
Maybe I somehow incorrectly add tensorlow, but I do not know how to fix it
This issue solved my problem:
https://github.com/tensorflow/tensorflow/issues/46144
I have a city.proto file where I import a well-known third-party package called gogoproto. I created gRPC server and now I want to test it's rpc methods by evans gRPC client.
I used such command but it raise an error:
evans proto/city.proto --host localhost --port 8000
Error:
evans: failed to run REPL mode: failed to instantiate a new spec:
failed to instantiate the spec from proto files: proto: failed to
parse passed proto files: proto/city.proto:7:8: open github.com/gogo/p
rotobuf/gogoproto/gogo.proto: The system cannot find the path
specified.
city.proto:
syntax = "proto3";
package proto;
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "./proto";
message City {
uint64 id = 1 [
json_name = "id",
(gogoproto.jsontag) = "id"
];
google.protobuf.Timestamp foundation_date = 2 [
json_name = "foundation_date",
(gogoproto.jsontag) = "foundation_date",
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true
];
google.protobuf.StringValue name = 3 [
json_name = "name",
(gogoproto.jsontag) = "name",
(gogoproto.wktpointer) = true
];
google.protobuf.StringValue country = 4 [
json_name = "country",
(gogoproto.jsontag) = "country",
(gogoproto.wktpointer) = true
];
}
***
go version:
go version go1.12.9 windows/amd64
protoc version:
libprotoc 3.11.4
evans version:
0.9.0
In all probability, I am not correctly trying to start REPL mode. I assume that the command needs to specify the path to the directory where third-party proto files are located. I am confused. How start evans (gRPC client) correctly?
To run Evans correctly, it's required to specify the correct paths to search for imports by using --path.
It is almost similar to --proto_path in protoc.
For example, we assume that github.com/gogo/protobuf is located in /path/to/github.com/gogo/protobuf:
$ evans --path /path/to --path . proto/city.proto
$ evans --path /path/to --path . --proto proto/city.proto # Better
Note that --path . is also required to search proto/city.proto.
Well-known protos managed by Google such as google/protobuf/wrappers.proto and google/protobuf/timestamp.proto are loaded by default, but in other cases, we have to specify correct paths to use third-party protos.
Is it possible to list just links/names to go dependencies?
For example in Gopkg.lock I have:
[[projects]]
digest = "x:xxxxxxx"
name = "cloud.google.com/go"
packages = [
"xxxxx",
"xxxxx/xxxxx",
]
I want just name: cloud.google.com/go be listed