Invalid package name when running Bazel under Windows in IntelliJ - intellij-idea

I'm getting this error when running Bazel via IntelliJ:
ERROR: Skipping '//src\main:all': Invalid package name 'src\main': package names may contain A-Z, a-z, 0-9, or any of ' !"#$%&'()*+,-./;<=>?[]^_`{|}~' (most 7-bit asc`ii` characters except 0-31, 127, ':', or '\')
My main target runs just fine in Powershell.
Here's my .bazelproject file:
directories:
.
src/main
test_sources:
src/test
src/scenarios
targets:
//:myapp
//src/main:myapp_lib
//src/tests:myapp_tests
//src/scenarios:myapp_scenarios
additional_languages:
kotlin
You can probably guess the layout from that.
I suspect it's a Windows problem just because of the way the / has been switched round to \, but I have no idea how to solve it. Can anyone help?

Related

Setting up JavaFX in IntelliJ - VM options not working at all

I've been going through Stackoverflow answers for a while now, but none works. Basically I want to run JavaFX in intellij and created the basic JavaFX project. I'm using JDK/JavaFX 13.0.1. I added it under libraries as well. The path is C:\Program Files\Java\jdk-13.0.1\bin\java.exe
But when I try to set the VM-options, I get
Error: Could not find or load main class Files\\Java\\javafx-sdk-13.0.1\\lib
Caused by: java.lang.ClassNotFoundException: Files\\Java\\javafx-sdk-13.0.1\\lib
In the VM options I have --module-path %path% --add-modules javafx.controls,javafx.fxml
for %path%, I have tried everything I've seen on stackoverflow:
C:\\Program Files\\Java\\javafx-sdk-13.0.1\\lib
\C:\\Program Files\\Java\\javafx-sdk-13.0.1\\lib\
\C:\Program Files\Java\javafx-sdk-13.0.1\lib\
C:\Program Files\Java\javafx-sdk-13.0.1\lib
same with / instead of \.
What the hell is going on, can someone please help me get it running?
If the path you are referencing in the VM Options contains spaces, it should be surrounded by the double quotes ("):
-module-path "C:\Program Files\Java\javafx-sdk-13.0.1\lib"

Update to Alamofire 4.0 and Swift 3.0 via Carthage

I am trying to update Alamofire to version 4.0. When I run carthage update I get many errors when building Alamofire scheme. It looks like files weren't updated to Swift 3.0 syntax. What I am doing wrong? Log from terminal:
*** Checking out Alamofire at "4.0.0"
*** xcodebuild output can be found in /var/folders/ls/6t_b5mqx5s187hq2dtts6ys00000gn/T/carthage-xcodebuild.ORghi2.log
*** Building scheme "Alamofire watchOS" in Alamofire.xcworkspace
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:36:1: error: expressions are not allowed at the top level
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:36:5: error: consecutive statements on a line must be separated by ';'
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:74:5: error: expected declaration
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:74:9: error: consecutive declarations on a line must be separated by ';'
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:77:5: error: expected declaration
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:77:9: error: consecutive declarations on a line must be separated by ';'
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:80:5: error: expected declaration
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:80:9: error: consecutive declarations on a line must be separated by ';'
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:83:5: error: expected declaration
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:83:9: error: consecutive declarations on a line must be separated by ';'
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:89:5: error: expected declaration
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:89:9: error: consecutive declarations on a line must be separated by ';'
/Users/liborzapletal/Documents/Aplikace/PNG/PNG/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift:92:5: error: expected declaration
....... and many others
I am using carthage version 0.18. I tried delete carthage Build and Checkout folders. I have set Xcode 8 version as default. For now without any luck.
The problem was that in terminal default Xcode was still 7. I checked it by command:
xcodebuild -version
which returns:
Xcode 7.3
Build version 7D175
In system it looks like default is Xcode 8.0 but not in terminal. So I use command:
sudo xcode-select -switch /Applications/Xcode\ 8.app/
And now it's working.

How to setup WebStorm / IntelliJ so the output from Grunt console has links into the files, in the same way a FileWatcher that calls tsc would do

Using IntelliJ/WebStorm if I run tsc from a FileWatcher, my compile errors are linked to the files in the editor, such that if I double-click on a compiler error, it opens that file and takes me to the offending line of code.
However if I run Grunt, either via the integrated Grunt console, or via a FileWatcher, the compile errors do not have links and I have to manually open the file and goto the offending line number.
Is there any way to get the compile errors comming from Grunt integrated as links, like the TypeScript FileWatcher's invocation of tsc does?
When running Grunt as a file watcher, you can set up filters to make links clickable. You can use existing filters as example: open your file watcher settings, press Output Filters..., open the filter settings and copy the regular expression specified there. See http://www.jetbrains.com/webstorm/webhelp/add-filter-dialog.html
In Webstorm 8, it is not possible to apply regular expression filters on Grunt console output.
The way to go, as mentioned by lena, is to call Grunt directly via an External tool entry, and set up appropriate regex filters, such as:
For grunt-ts:
$FILE_PATH$\($LINE$,$COLUMN$\):.*
For grunt-tslint:
...$FILE_PATH$\[$LINE$,\s$COLUMN$\]:.*
Also see my comment above regarding a caveat for grunt-tslint in some environments.
I believe the '>>' added by grunt-typescript is throwing it off. Try grunt-ts (disclaimer : one of the authors) which is tested with webstorm https://github.com/grunt-ts/grunt-ts
I noticed in Webstorm 9, the built-in Grunt console was filtering/linking on typescript compile errors with grunt-typescript. I am not sure if this is a recent change or not, but it was linking this for example,
So, I went into grunt-tslint/node_modules/tslint/build/formatters, and copied proseFormatter.js to ./myproseFormatter.js. Then I tweaked it so the tslint output format would match the compile error format, by replacing square brackets with parens, and removing the whitespace between line and column number. Finally, I referenced my custom formatter in my gruntfile tslint config by adding the formatter and formattersDirectory properties:
tslint: {
options: {
configuration: grunt.file.readJSON('tslint.json'),
formatter: 'myprose',
formattersDirectory: './'
},
all: {
src: [ 'app/**/*.ts' ]
}
}
and it worked!

Error installing Sql Server sink - Semantic logging

I'm trying to install Semantic logging Sql Server sink into my application but each attempt so far failed. The error I'm getting is (in CMD mode):
Attempting to resolve dependency 'EnterpriseLibrary.SemanticLogging (≥ 1.0)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5)'.
Attempting to resolve dependency 'EnterpriseLibrary.TransientFaultHandling.Data (≥ 6.0)'.
Attempting to resolve dependency 'EnterpriseLibrary.TransientFaultHandling (≥ 6.0)'.
Installing 'EnterpriseLibrary.TransientFaultHandling 6.0.1304.0'.
You are downloading EnterpriseLibrary.TransientFaultHandling from Microsoft, the license agreement to which is available at http://www.opensource.org/licenses/ms-pl. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Install failed. Rolling back...
install-package : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
At line:1 char:1
+ install-package
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], PathTooLongException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Tried both UI and command prompt installations still no luck. Any help would be appreciated very much.
Had a similar problem. You might try to move just this single package to a shorter directory, e.g. C:\Packages. Otherwise move your whole project path (e.g. C:\users\yourname\documents...) to a short path like c:\MyProjects.

ANTRL4: TestRig error

I am just trying to get ANTLR to run following those instructions: http://www.antlr.org/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4
The grammar is translated into code, but when I want to call TestRig, I'm getting the error "Can't load Hello as lexer or parser".
TestRig is located in file C:\bin\grun.cmd and contains this command
java -cp .;C:\LIBS\Java\ANTLR\antlr-4.1-complete.jar
org.antlr.v4.runtime.misc.TestRig %1 %2
Is anything wrong with that?
When I try to start TestRig from the ANTLWorks IDE I'm receiving warnings like:
warning: Supported source version 'RELEASE_6' from annotation
processor
'org.netbeans.modules.openide.modules.PatchedPublicProcessor' less
than -source '1.7'
warning: Supported source version 'RELEASE_6' from
annotation processor
'org.netbeans.modules.openide.util.ServiceProviderProcessor' less than
-source '1.7'
warning: Supported source version 'RELEASE_6' from annotation processor
'org.netbeans.modules.openide.util.NamedServiceProcessor' less than
-source '1.7'
warning: Supported source version 'RELEASE_6' from annotation processor
'org.netbeans.modules.openide.util.NbBundleProcessor' less than
-source '1.7'
and errors like:
line 1:7 token recognition error at: ' '
...........
line 1:0 missing 'hello' at 'grammar'
On Linux I'm experiencing another problem with ANTLRWorks2:
For whatever reason the menu bar doesn't work so that it's impossible to select anything from there. Anyway, clicking on an icon below the menu bar works.
What might be wrong here? Thanks for any help.
Almost a year late on this but in case others have the issue...
I am guessing you named your grammar file 'hello' instead of 'Hello' or you didn't copy the contents correctly.
https://theantlrguy.atlassian.net/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4
The warnings about 'RELEASE_6' are supposedly harmless according to this bug report.
https://netbeans.org/bugzilla/show_bug.cgi?id=210286
I am still getting these warnings in ANTLRWorks2.1. According to the final post it may be fixed in the NetBeans plugin. However, as far as I can tell this plugin has been recently broken.
I can't help you with IDE issues on Linux.