Comments (3)
It's a fair point... I'm not sure how it could be solved in Liftoff code itself, since the template that's selected would affect what main class names are allowed. I think using the name of any core libGDX class for the main class name is a bad idea, though. Just like I wouldn't name a class in my code after something that exists in the core JDK library, like Array, I mean, Queue, I mean, Vector, I mean... uh...
from gdx-liftoff.
I have an easy monstrosity of a fix in the latest commit. I took the listing of every type in the libGDX core from a file generated in its docs, type-search-index.js
, did some minor preprocessing with find+replace, and got a massive HashSet out of it. This is checked in the validation step for the main class field, and it also does a similar check to the one used for validating packages. Now, names such as Game
, Stage
, Map
, Path
, Cell
, and so on are all noted as duplicates and forbidden from being the main class name. Platform-specific names aren't really a concern here yet, because so few classes might collide in a launcher file.
Thanks for your work, @cartesian-plane ! I do think the code that's in the latest commit is more robust, even if the way I wrote it is a little crazy. However, if you and @SonicGDX hadn't brought my attention to this issue, it would probably still be sitting here, collecting dust.
I think this is resolved, though I'm not totally sure. Please comment here or reopen after the next release (1.12.1.8) if this isn't solved then!
from gdx-liftoff.
It's a fair point... I'm not sure how it could be solved in Liftoff code itself, since the template that's selected would affect what main class names are allowed. I think using the name of any core libGDX class for the main class name is a bad idea, though. Just like I wouldn't name a class in my code after something that exists in the core JDK library, like Array, I mean, Queue, I mean, Vector, I mean... uh...
I would like to make a more general fix for this, but I'm not sure if there is any way to read what Template is selected.
Is that not possible, or am I missing something?
from gdx-liftoff.
Related Issues (20)
- Request: Changes to .editorconfig HOT 2
- KTX AI module HOT 2
- Trojan detected (1.11.0.9 only) HOT 2
- Gradle Kotlin support HOT 2
- File picker fails with a native error on Linux HOT 5
- Error building Android generated project with Kotlin HOT 6
- Disable Gradle Daemon for Gradle Tasks Performed in Project Generation HOT 2
- Bundle Release for Android with Lombok HOT 1
- minifyEnabled true can create problems HOT 9
- classes cannot be resolved in ios project. HOT 6
- gwt-module.dtd Not found HOT 2
- 1.12.0.2 does not start on OSX HOT 6
- Add Fleks to third party libraries? HOT 1
- Issue in project opening HOT 4
- lwjgl3:dist task broken HOT 2
- Created Project with Language Kotlin does not work HOT 1
- Clarify LWJGL2 Compatibility with JDK17+ in Documentation HOT 5
- Consider changing the title in index.html from "libGDX application" to the project name HOT 1
- DANGEROUS BUG: specifying ~/ as path results in a literal folder "~" being created HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdx-liftoff.