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.
Related
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
When I use this way to add a property:
ext {
some = [
...
]
}
IDEA shows me a yellow warning on some:
Cannot assign 'LinkedHashMap<String, Object>' to 'Class<some>'
If I make some as String:
ext["some"] = [...]
Then the yellow warning disappeared.
Why and what is the right way to add a property on gradle ext?
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
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?
My goal is to be able to write src and tests files in es6, all in the same directory (I want my test files to be side-by-side with my source files), and get coverage report with the original files.
The best I can come up with at this point is to have my test files included in the coverage report with the following command:
./node_modules/.bin/babel-node node_modules/.bin/babel-istanbul \
cover \
node_modules/.bin/_mocha -- 'src/**/*.spec.*.js'
I did try using the cover -x 'src/**/*.spec.*.js', it also excludes the files from transpiling and mocha then fails to run the tests. For the life of me, I cannot figure out how to do the equivalent of something like this:
./node_modules/.bin/babel-node node_modules/.bin/babel-istanbul \
cover -x 'src/**/*.spec.*.js' \
node_modules/.bin/_mocha -- --require babel-core/register 'src/**/*.spec.*.js'
this will run all my tests fine but has the negative effect of giving me:
No coverage information was collected, exit without writing coverage information
So I am not too far from what I want, I'm think I'm just missing that last piece there and if somebody can help here, it would be really appreciated.
Regards,
D.
Never got the -x option to do what I wanted. If you don't mind using an .istanbul.yml file this worked for me to get side-by-side tests excluded from coverage reports...
npm run cover command:
babel-node node_modules/.bin/babel-istanbul cover _mocha -- --opts mocha.opts
project_dir/mocha.opts file:
src/**/*.test.js
--compilers js:babel-register
--require babel-polyfill
project_dir/.istanbul.yml file:
instrumentation:
root: src
include-all-sources: true
verbose: true
excludes: ["*.test.js"]
reporting:
dir: "coverage"
For anyone finding this much later, the stack with mocha, #babel and nyc is much much much much (did I say much?) easier to configure. No more need of that babel-node.
package.json:
{
...
"scripts": {
"coveralls": "cat reports/coverage/lcov/info | coveralls", // <-- Used on CI
"coverage": "nyc --report-dir=reports/coverage npm test",
"test": "mocha \"src/**/*.test.js?(x)\""
},
"mocha": {
"require": [
"#babel/register",
...
]
},
...
}
and here's an example of my .nycrc:
{
"all": true,
"cache": false,
"temp-dir": "./reports/nyc_output",
"check-coverage": false,
"require": [
"#babel/register"
],
"exclude": [
"dist/",
"reports/",
"src/**/*.test.js",
"src/**/*.test.jsx"
],
"extension": [
".js",
".jsx"
],
"reporter": [
"cobertura",
"lcov",
"html"
],
"watermarks": {
"statements": [50, 80],
"lines": [50, 80],
"functions": [50, 80],
"branches": [50, 80]
}
}