It seems there is a conflict of version for the antlr-runtime lib pulled by ANTLR 4.10.1: 3.5.2 versus 3.5.3.
Here is the gradle analyze result:
Antlr team can you confirm please?
The issue has been raised on project's github:
https://github.com/antlr/antlr4/issues/3733
I stumbled across this issue attempting to use ANTLR4 in a PHP environment.
While the issue still exists afaik (I'm on PHP7.4.3 and upgrading to PHP8 is not an option for me so it may work fine on later versions of PHP).
My workaround went as follows:
generated the php code using antlr as instructed here: https://github.com/antlr/antlr-php-runtime
discovered errors where the runtime version does not match the generated code
went to github and found the following codechanges: https://github.com/antlr/antlr-php-runtime/pull/23/files
made these changes by hand in the runtime files in vendor/antlr/antlr4-php-runtime/src/
This got my code communicating the same ATN type between classes (the first of the differences between the runtime version and my generated classes). But walking my grammar gave me another error - probably another difference between runtime and generated versions.
The code for this one was in the antlr/antlr4 repo instead of the antlr-php-runtime repo:
I found issue "PHP target runtime crashes with "Undefined offset: 0 in ATNDeserializer.php on line 731" #3509
(https://github.com/antlr/antlr4/issues/3509)
In the posts, the last commenter (kaby76) includes a zipfile called "Generated.zip" that contains the generated source code as it is supposed to look like.
I downloaded and extracted the files here. My error was occurring in ATNDeserializer.php and I found that the sourcecode from Kaby's zipfile did not include the ATN fixes I described above but it did contain the addition of IsFeatureSupported.
Since my grammar does not produce the indicated ADDED_UNICODE_SMP, I just commented that portion out in the deserialize function:
...
// First, deserialize sets with 16-bit arguments <= U+FFFF.
$this->readSets($sets, function () {
return $this->readInt();
});
// Next, if the ATN was serialized with the Unicode SMP feature,
// deserialize sets with 32-bit arguments <= U+10FFFF.
/*
if ($this->isFeatureSupported(self::ADDED_UNICODE_SMP, $this->uuid)) {
$this->readSets($sets, function () {
return $this->readInt32();
});
}
*/
$this->readEdges($atn, $sets);
...
Although this got me working, it is a workaround and not recommended as a long-term solution.
Related
I have a Golang service which uses Protobuf. The library used by Go and the version of the compiler need to be similar enough as per the documentation:
Users should use generated code produced by a version of protoc-gen-go that is identical to the runtime version provided by the protobuf module. This project promises that the runtime remains compatible with code produced by a version of the generator that is no older than 1 year from the version of the runtime used, according to the release dates of the minor version. Generated code is expected to use a runtime version that is at least as new as the generator used to produce it. Generated code contains references to protoimpl.EnforceVersion to statically ensure that the generated code and runtime do not drift sufficiently far apart.
The last sentence seems to imply that there is already code to ensure compatibility.
Is that correct?
That being said, I would like to be able to display the version of the library and of the compiled protobuf files in my logs to at least be able to manually verify that the versions are indeed compatible. How do I get both of these versions?
Update: Here is the section I mention in the comments.
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
I've got an Ektron 8.2 site, and I was trying to integrate Quartz.NET into it, in order to run some scheduling. Quartz.NET requires a library Common.Logging. This library introduces a conflict and breaks the Ektron code in App_Code/VBCode.
E.g. the following code from Utilities.vb
Case Is = Common.EkEnumeration.FolderType.Community
imageURL &= "images/ui/icons/folderCommunity.png"
Case Common.EkEnumeration.FolderType.Catalog
imageURL &= "images/ui/icons/folderGreen.png"
now gives a compile time error-
App_Code\VBCode\Utilities.vb(703,0): error BC30456: 'EkEnumeration' is not a member of 'Common'.
It appears that Common.Logging is conflicting with Ektron.Cms.Common (the Ektron files have a Imports Ektron.Cms statement). Is it possible to specify the priority on libraries? Or namespace an imported library?
Update
The Utilities.vb code is written by Ektron. I'd like to either make no changes to this code, or minimal changes, as any changes would need to be re-done upon Ektron upgrades. This is really a clash between 2 libraries - Ektron and Quartz.Net. Can I resolve this clash without changing the code of either library? Is there a configuration setting for aliasing libraries?
A simple solution is to use the full namespace, Ektron.Cms.Common.EkEnumeration, rather than relying on the include to sort things out automatically.
I.e.
Case Is = Ektron.Cms.Common.EkEnumeration...
Not elegant, but should get you working again.
Another alternative is to use a namespace alias:
using EkCommon = Ektron.Cms.Common;
So your code would instead look like:
EkCommon.EkEnumeration.FolderType.Community
I have some vb6 code I have not compiled in a long time. The last compile is in production. Now I get an error "User-defined type is not defined" when I do a full compile. I'm sure there is a reference missing. But there is no code that is hi-lighted. And I cannot seem to find what reference might be lost.
Any clues as to what I can do to find the missing reference would be very helpful.
Thanks!
Dave
I've had that happen before it drove me crazy!! But then I found this:
http://support.microsoft.com/kb/190197
Occurs when compiling with binary compatibility on. The above solution suggests turning off binary compatibility and re-compiling - then missing reference will then be highlighted.
Other steps you can try:
Rather than turning off BC for everything look for ones that have
been recently changed
search C: drive and dev folder and delete any
*.oca files
also look in the vbp file for any oca references
You need to ensure that you have the appropriate items checked in the References dialog. This is outside the code and they are listed in the VBP file (text file).
EDIT Corrected reference storage. Thanks MarkJ
Make sure all of your object types are spelled right. A simple error like spelling Variant Varient can cause this error as well.
Are you still using the same machine in which the original compile was made and / or with the same OS
?
If the answer is no, then there is a chance that VB6 or its like linked to a reference which is no longer available in Win7 or later, this may also include the compiler if you are using a modern version of studio.
Since the code is also in VB6, if you are using any outside commercial controls, and again if not on the same machine, you would loose those links as well if you did not port over the library.
I'm using PhpDocumentor (1.4.4) & NetBeans (7.1). When I generate the php documentation I get an error/warning on the top of the documentation (and in documentation in certain places too):
"Strict Standards: Only variables should be passed by reference in ..."
Does anybody know why is this problem?
Formerly (not on this computer) I didn't get this message.
The root cause here is that phpDocumentor itself if PHP4 code. I'm guessing you are executing it on PHP5, and are thus seeing runtime notices based on your error reporting level in php.ini.
This is nothing to worry about with regard to using phpDocumentor, nor is it something to worry about in your source code that you are documenting.
PHP Documentation states:
The following things can be passed by reference:
- Variables, i.e. foo($a)
- New statements, i.e. foo(new foobar())
- References returned from functions
No other expressions should be passed by reference, as the result is undefined.
This has been the case since PHP 4.0.4. Most likely your source code is out-dated and needs changes.
At last the solution:
I used smarty themes (HTML:Smarty:*) and there was no errors.
Solved.
I recently installed Chirpy v2.01 for Visual Studio 2010 and am very excited about the features it offers. I'm running into some issues in the LESS domain, however.
As a first step, I copied over my existing .css file to a new LESS file. I immediately am getting two errors. The first is due to a CSS "filter" property that I have set:
div.someClass {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', endColorstr='#000000');
}
This apparently is because the filter value is not technically valid css. LESS has a workaround for this, via escaping. Adding a tilde in front of a quoted section tells LESS to keep the value as-is. The following change should resolve the issue:
div.someClass {
filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', endColorstr='#000000')";
}
Upon saving the file, I still receive an error in the visual studio error console along these lines:
Error 54 Expected '}' on line 2 in file 'C:\Users\Administrator\Projects\Project\Content\test.chirp.less':
[1]: body {
[2]: filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr='#aaaaaa', endColorstr='#000000')";
----^
[3]: } C:\Users\Administrator\Projects\Project\Content\test.chirp.less 2 5 Project
The .css files are never generated so long as this error comes up. I came across the following site that seems to describe the issue I'm having, but in a more generic DotLess .NET package. I tried adding this package to my project, but it didn't make a difference. It also looks like it relies on the server to handle the .less to .css conversion, instead of the IDE, as chirpy does.
The second error that I constantly receive, though it doesn't seem to actually stop the generation of the .css files, is the following:
Error 53 Fatal error, cannot continue: null cannot be converted to an object C:\Users\Administrator\Projects\Project\Content\test.css 1 1 Project
I'd really love to use the LESS functionality that Chirpy offers, but until I can figure out why these errors are happening, I'm limited to using it for mash.
you have to understand that Chirpy is simply using dotlesscss internally to transform the less into css.
So any bug in dotless also applies to Chirpy.
We have patched that bug quite recently and a new dotlesscss version is upcoming.. But how long it will take until Chirpy updates to the new version is up to the Chirpy developers..
greetings Daniel
I wrote a similar VS extension that compiles less but it uses less.js directly and doesn't depend on dotless. Check it out.