cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
580 stars 7 forks source link

NullPointerException creating project from existing source with deps.edn 2019.2 #2209

Open Hendekagon opened 5 years ago

Hendekagon commented 5 years ago

I'm getting a NPE when trying to import an existing deps.edn project with IntelliJ 2019.2 & Cursive 1.8.2-2019.2. The project is a fresh deps.edn project with one blank namespace and the only dependency is on Clojure 1.10.0. Also many of my existing deps.edn projects now have "Run Configuration Error: No modules containing clojure.main found" on their run>Clojure REPL settings & their REPLs won't run

Freezystem commented 5 years ago

I got this error too on projects running on clojure 1.8.0 or 1.10.0

Error reading /Users/.../.../project.clj Syntax error compiling var at (fipp/ednize.clj:71:13). Unable to resolve var: clojure.instant/thread-local-utc-date-format in this context

Bug seems to be related to venantius/ultra, see.

eatobin commented 5 years ago

Having the same problems as @Hendekagon with 1.10.1 on projects that worked yesterday (before updates to IntelliJ and Cursive).

scottlowe commented 5 years ago

I've got an existing deps.edn project that I decided to import from scratch, after the upgrade to IntelliJ 2019.2 + Cursive 1.8.2-2019.2.

I'm also getting an NPE. Some sort of DataNode error. Does this relate to the "Fixed" IntelliJ issue here? https://youtrack.jetbrains.com/issue/IDEA-217619

Perhaps this screenshot would help:

Screen Shot 2019-07-25 at 3 46 46 PM

Incidentally, the "Show Log" link is also dead, hence the screenshot.

Update

I downgraded to IntelliJ 2019.1.3 and used that to re-create the [project-name].iml file. Then managed to open the project again in IntelliJ 2019.2. However, the Clojure Deps tools window does not list aliases. Something still not quite right.

juskrey commented 5 years ago

Confirming the same as @scottlowe On some projects aliases aren't shown, others are throwing aforementioned exception. Basically none of my deps.edn project have loaded correctly. Had to revert to 2019.1.3

cursive-ide commented 5 years ago

This appears to be a platform issue, I've filed a ticket at IDEA-218954, and I'll comment over there too.

eatobin commented 5 years ago

Thank you for reporting to JB, Colin. It looks like this will be fixed in IDEA 2019.2.1.

alex-dixon commented 5 years ago

Working with 2019.1.4. Installed from here.

eatobin commented 5 years ago

Have just tried the EAP (Preview) version of 2019.2.1 and it appears to have fixed the problem. I believe the build # is 192.6262.9.

eatobin commented 5 years ago

Whoops... spoke too soon about 192.6262.9. Am receiving this error on a Deps project open:

Screenshot_2019-08-14_15-29-25

Here's the error text:

com.intellij.serialization.SerializationException: Cannot create instance (beanClass=cursive.deps.DepsAliasData, initArgs=null, project) at com.intellij.serialization.BeanBinding.createUsingCustomConstructor(BeanBinding.kt:144) at com.intellij.serialization.BeanBinding.deserialize(BeanBinding.kt:214) at com.intellij.serialization.PolymorphicBinding.doDeserialize(PolymorphicBinding.kt:53) at com.intellij.serialization.PolymorphicBinding.deserialize(PolymorphicBinding.kt:19) at com.intellij.serialization.BeanBinding.readIntoObject(BeanBinding.kt:250) at com.intellij.serialization.BeanBinding.readIntoObject$default(BeanBinding.kt:222) at com.intellij.serialization.BeanBinding.deserialize(BeanBinding.kt:217) at com.intellij.serialization.BaseCollectionBinding.readInto(CollectionBinding.kt:36) at com.intellij.serialization.CollectionBinding.deserialize(CollectionBinding.kt:91) at com.intellij.serialization.BeanBinding.readIntoObject(BeanBinding.kt:250) at com.intellij.serialization.BeanBinding.readIntoObject$default(BeanBinding.kt:222) at com.intellij.serialization.BeanBinding.deserialize(BeanBinding.kt:217) at com.intellij.serialization.Binding$DefaultImpls.deserialize(Binding.kt:16) at com.intellij.serialization.BeanBinding.deserialize(BeanBinding.kt:19) at com.intellij.serialization.BeanBinding.readIntoObject(BeanBinding.kt:250) at com.intellij.serialization.BeanBinding.readIntoObject$default(BeanBinding.kt:222) at com.intellij.serialization.BeanBinding.deserialize(BeanBinding.kt:217) at com.intellij.serialization.BaseCollectionBinding.readInto(CollectionBinding.kt:36) at com.intellij.serialization.CollectionBinding.deserialize(CollectionBinding.kt:54) at com.intellij.serialization.CollectionBinding.deserialize(CollectionBinding.kt:44) at com.intellij.serialization.IonObjectSerializer.doRead(IonObjectSerializer.kt:143) at com.intellij.serialization.IonObjectSerializer.readVersioned(IonObjectSerializer.kt:95) at com.intellij.serialization.VersionedFile.readAndHandleErrors(VersionedFile.kt:58) at com.intellij.serialization.VersionedFile.readList(VersionedFile.kt:46) at com.intellij.serialization.VersionedFile.readList$default(VersionedFile.kt:44) at com.intellij.serialization.VersionedFile.readList(VersionedFile.kt) at com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsDataStorage.load(ExternalProjectsDataStorage.java:378) at com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsDataStorage.load(ExternalProjectsDataStorage.java:85) at com.intellij.openapi.externalSystem.service.project.manage.ExternalProjectsManagerImpl.init(ExternalProjectsManagerImpl.java:154) at com.intellij.openapi.externalSystem.service.ExternalSystemStartupActivity.runActivity(ExternalSystemStartupActivity.java:22) at com.intellij.ide.startup.impl.StartupManagerImpl.runActivity(StartupManagerImpl.java:205) at com.intellij.ide.startup.impl.StartupManagerImpl.lambda$runPostStartupActivitiesFromExtensions$2(StartupManagerImpl.java:172) at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processWithPluginDescriptor(ExtensionPointImpl.java:321) at com.intellij.openapi.extensions.ExtensionPointName.processWithPluginDescriptor(ExtensionPointName.java:140) at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivitiesFromExtensions(StartupManagerImpl.java:170) at com.intellij.openapi.project.impl.ProjectManagerImpl.lambda$null$8(ProjectManagerImpl.java:407) at com.intellij.openapi.project.impl.ProjectManagerImpl.loadProjectUnderProgress(ProjectManagerImpl.java:471) at com.intellij.openapi.project.impl.ProjectManagerImpl.lambda$openProject$9(ProjectManagerImpl.java:394) at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:439) at com.intellij.platform.PlatformProjectOpenProcessor.prepareAndOpenProject(PlatformProjectOpenProcessor.java:272) at com.intellij.platform.PlatformProjectOpenProcessor.lambda$doOpenProject$0(PlatformProjectOpenProcessor.java:198) at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:253) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:894) at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:447) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$9(ApplicationImpl.java:552) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at com.intellij.serialization.BeanBinding.createUsingCustomConstructor(BeanBinding.kt:141) ... 55 more Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method cursive.deps.DepsAliasData., parameter name at cursive.deps.DepsAliasData.(DepsSupport.kt) ... 60 more

cursive-ide commented 5 years ago

Yes sorry, that is IDEA-220192.

The deps support is currently based on an IntelliJ API which has been very problematic. I'm currently in the process of migrating it off that API and instead basing it on my existing code from the Lein integration. That'll take a couple of weeks though.

slifin commented 5 years ago

gah I was trying to import https://github.com/Datomic/ion-starter into Cursive with no idea why I couldn't get a REPL running, this was super non-obvious because I did have a project with deps working from a previous version

hope IntelliJ can sort out their APIs 🤞

eatobin commented 5 years ago

Version 2019.2.1 is out today.

But unfortunately it seems the new version has no provision for a Deps or Leiningen import??:

Screenshot_2019-08-21_12-05-46

Am I missing something?

cursive-ide commented 5 years ago

Unfortunately 2019.2.1 doesn't fix this issue - update is here: https://groups.google.com/d/msg/cursive/ntvsiLAehY0/6LkDZSdyAAAJ.

@eatobin that problem looks like something else - is Cursive definitely installed and enabled? You can check that in your Plugins view.

eatobin commented 5 years ago

I will check and let you know Colin. Cursive was installed and enabled under 2019.1.4 and I simply upgraded to the new version. I downgraded and Cursive was there (and happy).

Sent from my rotary phone.

On Wed, Aug 21, 2019, 15:48 Colin Fleming notifications@github.com wrote:

Unfortunately 2019.2.1 doesn't fix this issue - update is here: https://groups.google.com/d/msg/cursive/ntvsiLAehY0/6LkDZSdyAAAJ.

@eatobin https://github.com/eatobin that problem looks like something else - is Cursive definitely installed and enabled? You can check that in your Plugins view.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cursive-ide/cursive/issues/2209?email_source=notifications&email_token=AAGUSKVOZXUE2FAS3RSU3RTQFWSYJA5CNFSM4IG2CCGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD43CPSI#issuecomment-523642825, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGUSKTK5YTBQBBLSNGVEYTQFWSYJANCNFSM4IG2CCGA .

eatobin commented 5 years ago

Hello Colin. You were right. I did have Cursive installed/enabled in all my versions, but through the IntelliJ upgrades and downgrades, I ended up with an incompatible Cursive version. Updating the plugin version fixed my problem. Thank you.

I hope you are able to resolve your IntelliJ problem soon...

eatobin commented 4 years ago

Still broken with Cursive 1.9.0-eap2-2019.2 and IntelliJ 2019.2.3?

cursive

juskrey commented 4 years ago

Still broken with Cursive 1.9.0-eap2-2019.2 and IntelliJ 2019.2.3?

I think this is another issue, I have encountered on recent upgrade too https://github.com/cursive-ide/cursive/issues/2242

eatobin commented 4 years ago

Hello @cursive-ide - Colin. Would you update this please? Is IU 2019.1.4 + Cursive v1.8.2-2019.1 still the combo to use if you want Deps support? Is 2019.3 EAP an option? Thank you.

juskrey commented 4 years ago

IU 2019.2.3 works fine for me