Comments (3)
The reason is that SQLcl 20.3 comes with an updated parser version. The Arbori program based on the parser in 20.2 uses symbols that do not exist in the newer parser anymore. Hence there are some error messages when loading the Arbori program the first time.
It is not clear what the impact is exactly. However, the best approach is to use the Arbori program provided in 20.3 and apply the changes made. It's likely that some whitespace handling issues are fixed in this version of the formatter as well.
from plsql-formatter-settings.
Everything needed for the formatter is in dbtools-common.jar
. The same jar file is used in SQL Developer. However, it is not possible to patch an existing SQLDev 20.2 installation by replacing this jar file. As soon as you connect to a database the following error is thrown:
java.lang.NoClassDefFoundError: oracle.dbtools.db.VersionTracker
at oracle.dbtools.thirdparty.AmazonRedshift.AmazonRedshiftConnectionRecognizer.createConnectionInfo(AmazonRedshiftConnectionRecognizer.java:43)
at oracle.dbtools.raptor.navigator.ObjectFactoryRegistry.createConnectionInfo(ObjectFactoryRegistry.java:230)
at oracle.dbtools.raptor.navigator.ObjectFactoryRegistry.createFactory(ObjectFactoryRegistry.java:163)
at oracle.dbtools.raptor.navigator.ObjectFactoryRegistry.getFactory(ObjectFactoryRegistry.java:153)
at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode.getObjectFactory(DatabaseTreeNode.java:91)
at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:145)
at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:119)
at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:199)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:702)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The class is in the jar file, but I guess the OSGi bundle version does not match and that leads to this error message.
AFAIK there are no plans to release a SQLDev 20.3 version. This repository provides formatter settings primarily for SQLDev. They can be applied for the corresponding SQLcl version. It is a new situation that we have a SQLcl version without a corresponding SQLDev version.
I guess the most sensible thing to do is to postpone this fix until a new version of SQLDev with a corresponding/compatible SQLcl version is available.
from plsql-formatter-settings.
I did some tests and the conclusion is that the formatter settings for SQLDev 20.2 are not compatible with SQLcl 20.3. The formatter result might be wrong even if no error is shown.
On this branch https://github.com/Trivadis/plsql-formatter-settings/tree/bugfix/issue-70-sqlcl-20.3 the settings are provided that work with SQLcl 20.3.0. However, I do not plan to merge this to the main branch as long as no SQLDev version is available for these settings.
from plsql-formatter-settings.
Related Issues (20)
- formatting large files with repetitive statements, i.e. insert HOT 3
- noformat not working HOT 6
- Superb Script HOT 2
- Package constant formatting HOT 1
- Function header formatting: return deterministic HOT 1
- Support SQLDev 23.1.0 HOT 1
- Add - Formatierung "CASE WHEN" in SELECT statemen HOT 4
- Newlines being inserted into strings HOT 4
- Concatenation Bars being split apart invalidating strings HOT 2
- compiler flag concatenated to same line as end statement HOT 2
- Support SQLcl 23.3
- Do not reset Arbori program when importing trivadis_advanced_format.xml
- Unwanted line break after `whenever oserror` breaks code
- Wrong indentation in subqueries of with_clause in insert statements
- Unwanted line break before `on conversion error` in subquery
- spaces removed in grant statement
- Patching SQL Developer breaks Script Output tab feedback of direct SQL statement execution HOT 8
- Support SQLcl 23.4.0
- Can't export data after patch HOT 1
- Connection window is empty and not able to create any new database connection HOT 3
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 plsql-formatter-settings.