Gradle complains about bracket - gradle

I got really strange behavior in Gradle. I didn't change anything and it stop works.
It show this error:
startup failed:
build file 'D:\project\modules\view\build.gradle': 45: expecting ')', found '}' # line 45, column 1.
}
^
1 error
Open File
This is how my gradle.build looks like:
And this is my pathingJar task, I have also no idea why it's marked as yellow (it wasn't before and i'm pretty sure i didn't change anything)
Does someone know an reason?

The if in boot is missing a )
if(Os.isFamily(Os.FAMILY_WINDOWS)) // the last ')' was missing
{
// code omitted
}

Related

What is the correct way to use a stack with a scanner block in Ragel?

I'm using Ragel 6.10 with Go. I'm sure it's likely an issue with my code but I'm getting some weird errors when I try to use a stack with a scanner block. I'm trying to setup bracket matching and my code looks roughly like this;
ObjectValues := |*
# other stuff
'}' => { fret; };
*|
main := ('{' #{fcall ObjectValues;})*;
Looking at page 46 in the guide it looks like this should be possible. When I run Ragel ragel -G2 -Z main.rl. I get the following error when I try to compile (it only happens for -G2 FSM generation);
graphql_collections.rl:47[/Users/nathanfisher/workspace/go/src/github.com/nfisher/gir/graphql_collections.go:325:2]: syntax error: unexpected goto at end of statement
graphql_collections.go:60[/Users/nathanfisher/workspace/go/src/github.com/nfisher/gir/graphql_collections.go:60:1]: label _again defined and not used
Commenting out the fret line removes the error and warns postpop and prepush are unreachable.
The full code is here;
https://github.com/nfisher/gir/blob/broken/graphql_collections.rl#L47
A working minimal test-case is here;
https://gist.github.com/nfisher/649ca816f82bb3ccd7164331ac2324ac
Error for test-case;
main.rl:13[/Users/nathanfisher/workspace/go/src/github.com/nfisher/gir/command/runner/main.go:119:2]: syntax error: unexpected goto at end of statement
main.go:59[/Users/nathanfisher/workspace/go/src/github.com/nfisher/gir/command/runner/main.go:59:1]: label _again defined and not used
It looks like this is an issue relating to Ragel's generated code in v 6.10. Using the HEAD of ragel-6 branch fixes the issue. Thanks to Adrian Thurston for being super responsive/helpful via Twitter. :)
Reformatting the code from this;
To this fixes the error;

Load failed: Name cannot begin with the '<' character, hexadecimal value 0*3c. Line 610, position 3

Not able to open solution, I'n not getting how to resolve it any help appreciated,
Thank you,
I found whats causing this error,
Xamarin.ios.commontargets file has that "<" at line 610,
I removed it it's working fine now.
Thank you
I had the error on line 2, position 2 when attempting to load an Android project.
But the error was in AndroidManifest.xml - some merge comments.

Pro*c exec command not working

Error at line 16, column 1 in file glssim.pc
EXEC SQL
1
PCC-S-02201, Encountered the symbol "exec sql begin" when expecting one of the following:
Syntax error at line 0, column 0, file glssim.pc:
Error at line 0, column 0 in file glssim.pc
PCC-S-02201, Encountered the symbol "eof" when expecting one of the following:
an identifier, end-exec, random_terminal
Error at line 0, column 0 in file glssim.pc
PCC-F-02102, Fatal error while doing C preprocessing
I think the problem is related to exec library but I need to know where's it and where to add it.
thank you for your reply I am using proc command, I solved this issue,
by changing the order of the sys_include librairies in configuration file.
Now I have an other issue : the compiler is not recognizing functions
e.g : int function (void);
int function(){
some code
}
the compiler is saying Encountered the symbol {
when expecting one of the following ;= ([
It was due to function prototypes defined, in a header file, for wich the body was not defined.
Then the precompiler is waiting for their definitions, when it faces new functions it complains.
I just deleted the useless function prototypes. and it works fine

How to debug `Error while processing function` in `vim` and `nvim`?

TL;DR
How to find where exactly vim or nvim error started (which file?) when I'm interested in fixing the actual issue and not just removing the bad plugin? Anything better than strace and guesswork to find the error origin?
Issue
I often add a plugin to my vim or nvim config and end up getting errors on hooks (buffer open, close, write):
"test.py" [New] 0L, 0C written
Error detected while processing function 343[12]..272:
line 8:
E716: Key not present in Dictionary: _exec
E116: Invalid arguments for function get(a:args, 'exec', a:1['_exec'])
E15: Invalid expression: get(a:args, 'exec', a:1['_exec'])
The problem is, I have no idea where those come from, only get some line number of unknown file and I know it's not my vim/nvim config file.
Somewhere, you have a plugin that has defined a dictionary with anonymous-functions (check the help related to this tag).
For the curious ones, it's done this way:
let d = {}
function! d.whatever() abort
throw "blah"
endfunction
When you execute this function, you'll get the kind of error you're currently observing. That's why I stopped working this way to prefer:
let d = {}
function s:whatever() abort
throw "blah"
endfunction
let d.whatever = function('s:whatever') " a workaround is required for older versions of vim
" At least this way I'll get a `<SNR>42_whatever` in the exception throwpoint, and thus a scriptname.
That's the why. Now, back to your problem, AFAIK, the only things you'll be able to know are the two functions that have been called:
in line 12 of :function {343}, you've called
:function {272} which contains an error at line 8.
Thanks to these two commands (may be prefixed with :verbose, I don't remember exactly), you'll get the source code of the two functions, which you should be able to use in order to grep your plugins to know where it appears.

Does clang allow preprocessor ==?

I am trying to compile PHP on my Mac OS X 10.8 and I am getting the following problem:
In file included from /Users/ryan/Downloads/php-5.4.5/ext/phar/util.c:23:
ext/phar/phar_internal.h:223:19: error: invalid token at start of a preprocessor
expression
# if SIZEOF_SHORT == 2
^
I'm not sure why this error is occurring as this looks fine to me. I have opened the header file and could make changes if not or remove the if all together as I know what my system should be, but I was wondering if this is the proper approach to this problem.
It looks like SIZEOF_SHORT expands to no tokens. You should investigate where SIZEOF_SHORT is being #defined (this may be on the command line via -DSIZEOF_SHORT=) and fix that to provide the right value.
Alternatively, you could use this:
#include "limits.h"
/* ... */
#if SHRT_BIT == CHAR_BIT * 2
I didn't really find a solution to this problem, but I removed the if's and left behind the line that would be processed anyway and the program compiled just fine. I really don't know what was wrong with this file.

Resources