Giter Club home page Giter Club logo

dsl-compiler-client's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dsl-compiler-client's Issues

Compilation with -apply and without -migration in 1.2.1

Ends with message:
"Can't find SQL migration file. Unable to apply database migration."
In previous versions this worked.
Help says:
"-apply Apply migration on the database after creating the migration script"
Implicitly set -migration when -apply is set?

Parse/Compile unsaved dsl in Visual Studio Plugin

Low priority suggestion:

Although the .dsl file are parsed in real-time and can show errors as we type, the Parse and Compile buttons requires the .dsl file to be saved.

Some times I forget to save the .dsl file and press Compile and the plugin compiles the saved .dsl while I intuitively expected it to compile my latest changes. I think this might happen to other users too.

Would it be possible for those buttons to rather parse/compile the current unsaved dsl?

Or otherwise give me some kind of indication or prompt me to first optionally save the changes before continuing compilation?

Migration slow

it took so much time maybe around 5 minutes to do migration process. i have 60 aggregate roots and 40 more snowflakes. do you know how to speed up this process?
thanks

Cosmetic DSL changes should produce database migration scripts

When migrating:

module foo {
  aggregate Bar {
    String a;
    Int b;
  }
}

into

module foo {
  aggregate Bar {
    Int b;     // This is user ID
    String a; // This is user token
  }
}

A migration script will not be created, so when inspecting the next migration diff it may be confusing.
Also, it's a good feature to have the latest DSL in the database in case one needs to revert and the model was lost.

Bug: Visual Studio plugin does not save POCO settings to .sln

Seems like the VS plugin does not save the POCO settings to the .sln file.

Complete the POCO settings, check the checkbox, save the solution, close VS, open VS and the POCO is unchecked and my POCO settings are gone.

I'll try to fix the bug in the plugin when I have some time.

My current workaround is to restore my a copy of the .sln file with the POCO settings before I open the solution.

For example:

Microsoft Visual Studio Solution File, Format Version 12.00
...
Global
	GlobalSection(DslPlatformSolutionProperties) = preSolution
...
		Postgres.Compile = True
...
		Poco.Compile = True
		Poco.Name = UseCase1.DSL.Common
		Poco.Target = Common\Lib\Revenj
		Poco.Dependencies = Common\Lib\Revenj\POCO
		Poco.UseUtc = True
...
	EndGlobalSection
EndGlobal

IntelliJ stops opening .dsl files after indeterminate amount of time with DSL plugin enabled

Could not determine steps necessary to reproduce problem. It seems to happen after IntelliJ has been opened a relatively long time, with multiple cycles of suspend/awake on the machine (Ubuntu). Info + stack trace:

2017-10-16 13:03:43,899 [346990481]  ERROR - r.EditorHighlighterFactoryImpl - IntelliJ IDEA 2017.2.5  Build #IU-172.4343.14 
2017-10-16 13:03:43,899 [346990481]  ERROR - r.EditorHighlighterFactoryImpl - JDK: 1.8.0_152-release 
2017-10-16 13:03:43,899 [346990481]  ERROR - r.EditorHighlighterFactoryImpl - VM: OpenJDK 64-Bit Server VM 
2017-10-16 13:03:43,899 [346990481]  ERROR - r.EditorHighlighterFactoryImpl - Vendor: JetBrains s.r.o 
2017-10-16 13:03:43,899 [346990481]  ERROR - r.EditorHighlighterFactoryImpl - OS: Linux 
2017-10-16 13:03:43,899 [346990481]  ERROR - r.EditorHighlighterFactoryImpl - Current Command:  
2017-10-16 13:03:43,900 [346990482]  ERROR - tor.impl.FileEditorManagerImpl - java.util.concurrent.ExecutionException: com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.PsiPlainTextFileImpl because: File language:Language: TEXT != Provider base language:Language: DomainSpecificationLanguage
invalidated at: see attachment 
java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.PsiPlainTextFileImpl because: File language:Language: TEXT != Provider base language:Language: DomainSpecificationLanguage
invalidated at: see attachment
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:136)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.start(AsyncEditorLoader.java:80)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.<init>(TextEditorImpl.java:62)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.<init>(PsiAwareTextEditorImpl.java:44)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorProvider.createEditor(PsiAwareTextEditorProvider.java:48)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:860)
	at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2781)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:959)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:787)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:769)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:141)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:769)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:700)
	at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:155)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.a(FileEditorManagerImpl.java:1113)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:149)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
	at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openEditor(FileEditorManagerImpl.java:1111)
	at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigateInAnyFileEditor(OpenFileDescriptor.java:145)
	at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigateInEditor(OpenFileDescriptor.java:131)
	at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigateInEditorOrNativeApp(OpenFileDescriptor.java:127)
	at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigate(OpenFileDescriptor.java:114)
	at com.intellij.psi.impl.source.PsiFileImpl.navigate(PsiFileImpl.java:1023)
	at com.intellij.codeInsight.navigation.NavigationUtil.openFileWithPsiElement(NavigationUtil.java:192)
	at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.navigate(AbstractPsiBasedNode.java:239)
	at com.intellij.ide.projectView.impl.nodes.AbstractPsiBasedNode.navigate(AbstractPsiBasedNode.java:249)
	at com.intellij.ide.projectView.impl.nodes.PsiFileNode.navigate(PsiFileNode.java:133)
	at com.intellij.util.OpenSourceUtil.navigate(OpenSourceUtil.java:53)
	at com.intellij.util.OpenSourceUtil.openSourcesFrom(OpenSourceUtil.java:31)
	at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.processDoubleClick(EditSourceOnDoubleClickHandler.java:128)
	at com.intellij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.onDoubleClick(EditSourceOnDoubleClickHandler.java:120)
	at com.intellij.ui.DoubleClickListener.onClick(DoubleClickListener.java:30)
	at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:73)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:429)
	at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:58)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:821)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.util.concurrent.ExecutionException: com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.PsiPlainTextFileImpl because: File language:Language: TEXT != Provider base language:Language: DomainSpecificationLanguage
invalidated at: see attachment
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:132)
	... 77 more
Caused by: com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.PsiPlainTextFileImpl because: File language:Language: TEXT != Provider base language:Language: DomainSpecificationLanguage
invalidated at: see attachment
	at com.intellij.psi.impl.source.PsiFileImpl.getText(PsiFileImpl.java:370)
	at com.dslplatform.ideaplugin.DslLexerParser.start(DslLexerParser.java:174)
	at com.intellij.lexer.Lexer.start(Lexer.java:47)
	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.<init>(LexerEditorHighlighter.java:68)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:42)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:89)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.loadEditorInBackground(TextEditorImpl.java:68)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:50)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:100)
	at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$commitAndRunReadAction$2(PsiDocumentManagerBase.java:502)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:941)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitAndRunReadAction(PsiDocumentManagerBase.java:500)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:98)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.a(ProgressIndicatorUtils.java:146)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:548)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:144)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:98)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2017-10-16 13:03:43,902 [346990484]  ERROR - tor.impl.FileEditorManagerImpl - IntelliJ IDEA 2017.2.5  Build #IU-172.4343.14 
2017-10-16 13:03:43,902 [346990484]  ERROR - tor.impl.FileEditorManagerImpl - JDK: 1.8.0_152-release 
2017-10-16 13:03:43,902 [346990484]  ERROR - tor.impl.FileEditorManagerImpl - VM: OpenJDK 64-Bit Server VM 
2017-10-16 13:03:43,902 [346990484]  ERROR - tor.impl.FileEditorManagerImpl - Vendor: JetBrains s.r.o 
2017-10-16 13:03:43,902 [346990484]  ERROR - tor.impl.FileEditorManagerImpl - OS: Linux 
2017-10-16 13:03:43,902 [346990484]  ERROR - tor.impl.FileEditorManagerImpl - Current Command:  
2017-10-16 13:03:46,768 [346993350]  ERROR - r.EditorHighlighterFactoryImpl - Element: class com.intellij.psi.impl.source.PsiPlainTextFileImpl because: File language:Language: TEXT != Provider base language:Language: DomainSpecificationLanguage
invalidated at: see attachment 
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.PsiPlainTextFileImpl because: File language:Language: TEXT != Provider base language:Language: DomainSpecificationLanguage
invalidated at: see attachment
	at com.intellij.psi.impl.source.PsiFileImpl.getText(PsiFileImpl.java:370)
	at com.dslplatform.ideaplugin.DslLexerParser.start(DslLexerParser.java:174)
	at com.intellij.lexer.Lexer.start(Lexer.java:47)
	at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.<init>(LexerEditorHighlighter.java:68)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:42)
	at com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders$1.getEditorHighlighter(FileTypeEditorHighlighterProviders.java:50)
	at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:78)
	at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.loadEditorInBackground(TextEditorImpl.java:68)
	at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:50)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:100)
	at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$commitAndRunReadAction$2(PsiDocumentManagerBase.java:502)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:941)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitAndRunReadAction(PsiDocumentManagerBase.java:500)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:98)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.a(ProgressIndicatorUtils.java:146)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:170)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:548)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:144)
	at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.a(AsyncEditorLoader.java:98)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Bitdefender caught dsl plugin as a threat

What steps will reproduce the issue?

  1. have bitdefender installed
  2. install the dsl plugin https://plugins.jetbrains.com/plugin/8227-dsl-platform

What is the expected result?

It must be clean without any antivirus notification

What happens instead?

Bitdefender cought an dsl exe file as a threat. And it suggested me to run system scan.

I'm running windows 10 pro

My intellij is:

IntelliJ IDEA 2022.3.2 (Ultimate Edition)

Build #IU-223.8617.56, built on January 26, 2023

Latest library check

On compile error (probably due to library change) we should investigate and offer to download latest library version and retry compilation.

IntelliJ NPE issue

null
java.lang.NullPointerException
at com.dslplatform.ideaplugin.DslSyntaxHighlighterFactory$MapKey.hashCode(DslSyntaxHighlighterFactory.java:23)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at com.dslplatform.ideaplugin.DslSyntaxHighlighterFactory.getSyntaxHighlighter(DslSyntaxHighlighterFactory.java:38)
at com.intellij.openapi.fileTypes.SyntaxHighlighterFactory.getSyntaxHighlighter(SyntaxHighlighterFactory.java:39)
at com.intellij.openapi.fileTypes.LanguageFileTypeHighlighterProvider.create(LanguageFileTypeHighlighterProvider.java:31)
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.openapi.util.KeyedExtensionFactory.getByKey(KeyedExtensionFactory.java:93)
at com.intellij.openapi.util.KeyedExtensionFactory.access$000(KeyedExtensionFactory.java:34)
at com.intellij.openapi.util.KeyedExtensionFactory$1.invoke(KeyedExtensionFactory.java:57)
at com.sun.proxy.$Proxy89.create(Unknown Source)
at com.intellij.openapi.fileTypes.SyntaxHighlighterFactory.getSyntaxHighlighter(SyntaxHighlighterFactory.java:54)
at com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders$1.getEditorHighlighter(FileTypeEditorHighlighterProviders.java:51)
at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:49)
at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:59)
at com.intellij.diff.util.DiffUtil.createEditorHighlighter(DiffUtil.java:173)

Undo doesn't work in IDEA 2016

When using the dsl plugin for IDEA, we are unable to undo file changes (an error occurs).
Tried on Windows/Linux for Ultimate IDEA 2016

Unable to apply database migration

Error message: ERROR: cannot drop view "Model"."R_entity" because other objects depend on it

Database backup and migration script: DS\users\huitz\clc-report\

Revenj version detection

Compiling new generated model with old revenj present in compile direcotry brakes with wall of text errors containing "error CS0246: The type or namespace name `IPostgresTuple' could not be found. Are you missing an assembly reference?" messages.

Use case:
dsl-clc.jar version used : 1.2.0
Older revenj present in compile directory.
Compiler flags used: -java_client; -settings=active-record; -revenj -migration; log; download

Removing old revenj from compile folder fixes this issue but it would be nice to have warning about incompatible revenj versions.

dsl-clc should pass relative DSL paths to dsl-compiler

Currently, it is sending platform-dependent file paths such as:

r:\a\dsl\a.dsl
/home/melezov/foo/model/foo.dsl

This puts the absolute paths in the SQL migration script, where it should be relative, and platform-independent:

dsl/a.dsl
model/foo.dsl

dsl-compiler works with / as path separator on Windows, so replacing \ with / should work

Add an API as an alternative to reading the previous DSL from the database

Currently, the only way to perform a migration is to read the recent migration file from the database.

Add a way to supply the old migration programatically (e.g. as a Map<String, String>) so that migration generation can be integrated more seamlessly (e.g. by reading the old DSL from Git history or from another folder)

php_client and php_ui targets do not support Location type.

When compiling DSL with Location field, the output is as follows:

java -jar dsl-clc.jar -target=php_client,php_ui -settings=active-record
Compiling DSL online...
Error compiling DSL to specified target.
Couldn't find type for property type NGS.Plugins.Dsl.Concepts.LocationPropertyTypeConcept

Using dsl-clc.jar version 1.4.0 (although it reports itself as 1.3.0, but that's just a typo in the manifest).

Changing a unique constraint on aggregate fails

Example aggregate:

aggregate LoanProductPenalty {
    String(256)  name;
    Long         penaltyTypeId;
    Decimal      rate;
    Bool         applyOnlyAfterMaturity;
    Int?         fullPenaltyAfterDays;
    Int?         noPenaltyForDays;

    unique(penaltyTypeId, rate, applyOnlyAfterMaturity);
}

Changing the unique constraint (adding fullPenaltyAfterDays and noPenaltyForDays to it) generates in the migration file:

DO $$ BEGIN
    IF EXISTS(SELECT * FROM pg_constraint c JOIN pg_class r ON c.conrelid = r.oid JOIN pg_namespace n ON n.oid = r.relnamespace JOIN pg_description d ON r.oid = d.objoid AND d.objsubid = 0 WHERE c.conname = 'uq_LoanProductPenalty_penaltyTypeId_rate_applyOnlyAfterMaturity' AND n.nspname = 'instafin' AND r.relname = 'LoanProductPenalty' AND d.description LIKE 'NGS generated%') THEN
        ALTER TABLE "instafin"."LoanProductPenalty" DROP CONSTRAINT "uq_LoanProductPenalty_penaltyTypeId_rate_applyOnlyAfterMaturity";
    END IF;
END $$ LANGUAGE plpgsql;

Which does not execute because no objsubid = 0. Found objsuid with values: 5, 6, 7.

How to use Generated Php

I have run java -jar dsl-clc.jar target=php_client dsl=dsl
and its generated Generated-PHP folder. Could you give me example how to use it?
and i tried java -jar dsl-clc.jar target=php_ui dsl=dsl
but i got this error :
Can't create temporary target file. Compilation results can't be saved locally.
Not a directory

Option to hide or delay tooltips in Visual Studio Plugin

Low priority suggestion for a minor but constant irritation 😄

The tooltips pops up immediately and while it was useful in the beginning I now found them to be a distraction.

Alt Text

And they sometimes obstruct the status message:
image

Would it be possible to provide a user preference (or .config entry) to enable/disable the tooltips or change the initial delay to for example 3 seconds rather than showing it immediately?

I've added it to my backlog and when I have some time for this I'll submit a PR.

Bug: Visual Studio plugin does not detect .dsl files in "Solution Folders"

Seems the Visual Studio plugin only detect .dsl files if they are in Projects in the top level of the Solution Explorer.

If my Project with my .dsl files is in a Solution Folder then the Parse button returns:

DSL Platform compiler. Copyright � N.G.S. 2017
Version: 1.8.6456.19341
Usage: target=revenj.net dsl=dsl-folder

image
and the Compile button:
Object reference not set to an instance of an object.

image

I'll put it on my TODO list to fix someday but for now I just move my Project to the top level.

image

Migrations become destructive when renaming multiple enums

If you rename enum A -> A' and then B -> A, database migrations become destructive. Both enums and columns using it are dropped and then recreated .

When you just rename A -> A', run the migrations, and then rename B -> A, everything works as expected.

accidentally remove a table

I accidentally remove a table, when i try to generate migration script it shows this error message:
ERROR: relation "university.CoursePackageCourses" does not exist
Where: SQL statement "ALTER TABLE "university"."CoursePackageCourses" ADD COLUMN "CourseSchedulledID" INT"
PL/pgSQL function inline_code_block line 3 at SQL statement
What should i do to fix this?
Thanks

Error occurs when target=PHP and php= are both used

When both target argument has PHP in it, and php argument is set to existing or non-existing directory, operation migration fails with:

Failed to create target PHP folder: path_to_php_argument

However, said folder gets created if it doesn't exists and still the error appears. Generated files are downloaded successfully in correct location. The program exits after that with status 0.

Removing the target argument fixes the issue.

Provide easy tool to compile DSL to C# and include compiled jar

I just downloaded .NET library and in one of folders I found DSL files, below is one of them:

module ReportCommon
{
  value BasicInfo {
    ScrapeReport     scrapeReport;
    Bank             bank;
    String           source;
    String?          username;
    String?          address;
    String?          phone;
    String?          email;
    List<MiscEntry>  miscEntryList;
  }

  value ScrapeReport {
    Date     scrapeDate;    // scrape date
    String   status;        // status of scrape "ok", "invalid-login", "scrape-error" etc.
    String   comment;       // status comment "Process finished successfuly", etc.
    Int      reportNumber;  // ordinal number of report
    Boolean  isFinal;       // if report final
  }

  value Bank {
    String  country;         // ISO-3316: "SE", "ES", "FI"
    String  abbreviation;    // "op.fi"
    String  name;            // "Ossuspankki"
  }

  // TODO
  value MiscEntry {
    String  provider;   // trustbuddy.se
    String  key;        // user_id
    String  value;      // 12341234
  }

  value Scrape {
    ScrapeReport    scrapeReport;
    Bank            bank;
    UserDetails?    userDetails;    // it can be null in case of corporate account, in which cas companyDetails will be present
    CompanyDetails? companyDetails; // see above

    List<Account>   accountList;    // list of bank accounts
  }

  value UserDetails {
    String  name;
    String? address;
    String? phone;
    String? email;
  }

  value CompanyDetails {
    String  name;
    String? organizationNumber;
    String? address;
    String? phone;
    String? email;
  }

  value Account {
    String  number;
    String  kind;     // giro, currency
    Money   balance;  //
    String  currency; // infer "EUR"
    String? iban;
    String? holderName; // user can have access to bank accounts from different person in which case holderName will be different from UserDetails.name

    List<Transaction>  transactionList;
  }

  value Transaction {
    Date    onDate;
    String  description;
    Money   amount;    // if negative, then outgoing
    Money   balance;   // status of the account after this transaction
    Map     params;    // assume of no interset
  }
}

I was searching a bit and found this repository, but for someone without JAVA experience and without JAVA tools on his PC it will be hard to compile source code.

If it will be possible please add build output to each release, these way people like me would be able to compile DSL files to C# source.

If there is online tool that can do such things please let me know.
Thanks!

Connect to db using ssh

is it possible to connect to db host using Standard TCP/IP over SSH, using ssh key file? please give me some examples
Thanks

Latest client version

App should check if it's using the latest version and offer to download and replace it with the current one.

mysql support

is it possible to use this dsl compiler with mysql database?

PHPDoc format needs fixing

The generated Docblock for PHP classes has all the right information but it's in wrong order. Please modify the output so it conforms to the standard.

method return value(s):

// current
    /**
     * @return a string, can be null
     */
    public function getPersonalNumberForVerification()
    {
        return $this->personalNumberForVerification;
    }
// should be
    /**
     * @return string|null
     */
    public function getPersonalNumberForVerification()
    {
        return $this->personalNumberForVerification;
    }

// current
    /**
     * @return an array of strings
     */
    public function getAccountNumbersForVerification()
    {
        return $this->accountNumbersForVerification;
    }

// should be (arrays of something are noted with ending [])
    /**
     * @return string[]
     */
    public function getAccountNumbersForVerification()
    {
        return $this->accountNumbersForVerification;
    }

// current
    /**
     * @return an object of class "DemoSE\BankReport", can be null
     */
    public function getBankReport()
    {
        return $this->bankReport;
    }

// should be (note the starting backslash for namespace)
    /**
     * @return \DemoSE\BankReport|null
     */
    public function getBankReport()
    {
        return $this->bankReport;
    }

The Intellij editor plugin for DSL files crashes when reopening a file

The Intellij editor sometimes crashes with the following error. In this particular instance it happened after closing and reopening the file. Restarts and invalidate caches did not help.

java.lang.IllegalStateException: Unexpected termination offset for lexer com.dslplatform.ideaplugin.DslLexerParser@24a2759a
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.doSetText(LexerEditorHighlighter.java:394)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.setText(LexerEditorHighlighter.java:360)
    at com.intellij.openapi.fileEditor.impl.text.TextEditorImpl.loadEditorInBackground(TextEditorImpl.java:70)
    at com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.loadEditorInBackground(PsiAwareTextEditorImpl.java:50)
    at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$null$0(AsyncEditorLoader.java:100)
    at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$commitAndRunReadAction$3(PsiDocumentManagerBase.java:495)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:917)
    at com.intellij.psi.impl.PsiDocumentManagerBase.commitAndRunReadAction(PsiDocumentManagerBase.java:493)
    at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$null$1(AsyncEditorLoader.java:98)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$2(ProgressIndicatorUtils.java:140)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:138)
    at com.intellij.openapi.fileEditor.impl.text.AsyncEditorLoader.lambda$scheduleLoading$4(AsyncEditorLoader.java:98)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.