antlr / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
BSD 3-Clause "New" or "Revised" License
17.23k stars 3.29k forks source link

Could not deserialize ATN with UUID 59627784-3be5-417a-b9eb-8131a7286089 (expected aadb8d7e-aeef-4415-ad2b-8204d6cf042e or a legacy UUID). #4361

Open vish35 opened 1 year ago

vish35 commented 1 year ago

Hi in my project I need to use Antlr-4.9.3 version, along with I am using Antlr-Runtime 4.5 version. So sometimes I am receiving Could not deserialize ATN with UUID 59627784-3be5-417a-b9eb-8131a7286089 (expected aadb8d7e-aeef-4415-ad2b-8204d6cf042e or a legacy UUID). error and sometimes works fine. What could be issue?

jimidle commented 1 year ago

You need to match the runtime version with the tool version

On Wed, Jul 19, 2023 at 14:03 vishakha @.***> wrote:

Hi in my project I need to use Antlr-4.9.3 version, along with I am using Antlr-Runtime 4.5 version. So sometimes I am receiving Could not deserialize ATN with UUID 59627784-3be5-417a-b9eb-8131a7286089 (expected aadb8d7e-aeef-4415-ad2b-8204d6cf042e or a legacy UUID). error and sometimes works fine. What could be issue?

— Reply to this email directly, view it on GitHub https://github.com/antlr/antlr4/issues/4361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ7TMES53DBIPT5KBJPJUDXQ52C3ANCNFSM6AAAAAA2PMX2JY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

vish35 commented 1 year ago

Is there any reason for why it works sometime? Will it be because of legacy UUID?

jimidle commented 1 year ago

I could not tell you without looking at your grammar etc - but I am surprised that it works at all. As per the documentation, you MUST match the runtime you use with the version of the tool that you use to generate the code.