antlr / antlr5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update copyright message and package name

ftomassetti opened this issue · comments

At the moment we have hundreds of files inherited from ANTLR Kotlin starting in this way:

// Copyright 2017-present Strumenta and contributors, licensed under Apache 2.0.
// Copyright 2024-present Strumenta and contributors, licensed under BSD 3-Clause.

package com.strumenta.antlrkotlin.runtime

We should align the Copyright message to the one we have in other files, and for those other files we should update the end year:

/*
 * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
 * Use of this file is governed by the BSD 3-clause license that
 * can be found in the LICENSE.txt file in the project root.
 */

It could make sense to update all files to be in the form:

/*
* Copyright (c) 2012-present The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/

Regarding the packages, we should rename com.strumenta.antlrkotlin.runtime into org.antlr.v5.wasmruntime. Would this make sense?

It would, thanks!
@parrt IIRC you have a script that automatically updates the license ? Would you be able to share it ?

@parrt IIRC you have a script that automatically updates the license ? Would you be able to share it ?

I think it's possible to fix everything just using "Replace in files" functionality and regexes.

Regarding the packages, we should rename com.strumenta.antlrkotlin.runtime into org.antlr.v5.wasmruntime. Would this make sense?

If you mean files from https://github.com/antlr/antlr5/tree/dev/antlr-kotlin-runtime I think it doesn't make sense since currently they are unused (but they are kept to make it possible to implement other Kotlin targets later). If you mean files from https://github.com/antlr/antlr5/tree/dev/runtime/Kotlin/src I think it's incorrect to use org.antlr.v5.wasmruntime package name because they are not wasm-specific.

https://github.com/antlr/antlr5/tree/dev/antlr-kotlin-runtime

Regarding this directory name. It looks confused because actually it's kind of "remnants" and it makes sense to rename the directory to something like antlr-kotlin-runtime-remnants and add info to Readme that they should be eliminated in the future.

https://github.com/antlr/antlr5/tree/dev/antlr-kotlin-runtime

Regarding this directory name. It looks confused because actually it's kind of "remnants" and it makes sense to rename the directory to something like antlr-kotlin-runtime-remnants and add info to Readme that they should be eliminated in the future.

Agreed, please proceed

I'll have to dig that script up!

@ftomasseti am I correct thinking this is is fixed by #19 ?

@ericvergnaud #19 updates the copyright, I still need to fix the package names. For that another PR is coming

@ftomassetti can we close this ?

Yes, sorry I forgot to close it