Cursive cannot resolve "js/require" in CLJS - clojurescript

I'm trying to get started learning cljs by prototyping a react native app with expo. I set up a project with a Leiningen template "lein new expo". I installed cursive as well and added a configuration to connect it to the nRepl of my project.
The issue is that Cursive seems unable to resolve basic things. My basic hello world example is filled with "cannot resolve js/require". I must be missing some basic configuration for Cursive to warn about build in CLJS functions. Unfortunately I don't see anything about it in the documentation.

I've seen Cursive resolve when there is JavaScript source it can parse in order to build an index. But, for many JavaScript interop calls, it is fairly normal for it to not resolve things.
With respect to your particular js/require is marked as unresolved for me as well.

Related

Simple pilist prototype pollution dependabot alert

I’m working on a JavaScript/typescript project and I have used the github provided code scanner CI. Until one day I found a warning popping up saying:”simple-plist v1.3.0 was discovered to contain a prototype pollution vulnerability via .parse().” I thought updating the package should fix it but github says there was not patched version. I’m just wondering should I ignore this warning or should I do something about it? Even know they said this is a critical vulnerability 9.8/10.bit
Any help will be appreciated!

metadata tag not found with describeType in production

I am using describeType and am able to get all of the variable and accessor metadata tags just fine in local debug, local test suite or local air build. Our web app running this code also sees the metadata just fine in production (running with browser plugin). But, our production air desktop app throws my error "can't find metadata". When I added some logging code (being thoroughly confused LOL) I discovered that the metadata property in the XML from describeType is empty?!?
My only thought is that we use gradle and run a bunch of custom scripts during the actual build process... but HOW could that be either removing or making unreadable class metadata tags?
I've tried standard v/s custom tags, accessors v/s variables, describeType(instance) v/s describeType(class) and all of these give same result... all variations work everywhere every time except in production desktop build.
Anyone with ANY thoughts on this... please chime in. I've been pulling my hair out with this one!
Thanks!!!
so it turns out my "only thought" was the correct answer. after digging deeper I found that the keep-as3-metadata that was on our compiler options was not up to date in our grade build scripts and didn't include the tags we were using for this. Thank god!!! LOL.

Dart2JS compiler exception when minify is used on google_maps package

I have been building a web application with Dart and AngularDart upon Google Maps. I noticed a problem since the begin of the process even though I tested the development Dart sdk, and today the latest dart sdk (version 1.0.0.10_R30798) and still face the problem.
Firstly the packages I am using are shadow_dom, google_maps and AngularDart.
When I build my application WITH --no-minify option it works great, even in all the browsers after fiddling around with shadow_dom for a week (I should add the shadow_dom script BEFORE everything else to work properly).
The problem is that when I build normally (minify) or even directly using Dart2JS compiler with the --minify option the application does not run and I get an exception.
Above you can see the two cases, where in the first the application loads the google maps correctly and in the second picture the google maps are not loaded and I get that exception.
More importantly is that if I use a 3rd party minifier to minify the original main.dart.js file (the unminified) it works perfectly fine.
Thank you
The 2.x version of google_maps package has removed the dependency on dart:mirrors and is only based on dart:js. So the minification problem should come from another part of your code.
Moreover I just tested the map-simple example with --minify and it works.
Usually this can be solved with the #MirrorsUsed annotation if it's 3rd-party code that is affected.
It's easier with your own code where you just have to add #reflectable to the affected functions/methods/fields to ensure they are retained.
It may be hard to find what functions/methods/fields should be included when the names are minified.
Maybe you can gain some knowledge by looking at the stack trace.
Minification usually drops code that is not referenced anywhere.
In Polymer this is because polymer expressions {{ expr }} in HTML are not yet considered.
If you invoke parts of the code only by reflection this is also not recognized.
I have no experience with regard to Angular and minification.
This is just generic advice about problems with minification through pub build.

Coming from a Flash Builder background, how can I import a library into IntelliJ IDEA?

the only IDE I've used for many years was Flash Builder. Sadly the 4.7 version is in a poor state, so, I started looking at other IDE's lately.
I'm trying IDEA, but I don't know how to add a library to my project.
In FB it was simple, I go to the compiler settings and I just add a folder or swc. But here, it seems like there are 2 options, one under the "Libraries" tab and other is creating a new module, however, this new module requires a main app, SDK, and a lot of other stuff that doesn't make any sense to have in a library.
So, what is the equivalent of adding a library path here?.
Thanks.
"Libraries" is the correct way to do it. There are two kinds of libraries: libraries and global libraries. Global libraries can configured once and used in every project. Libraries are configured for each project. See http://www.jetbrains.com/idea/webhelp/configuring-project-and-global-libraries.html

Logback Configuration Error in Tomcat 7

I would like to use logback 1.0.0 to the activity of my web applications. Unfortunately the documentation on this subject is a tad sparse. I followed the official tutorial here:
http://logback.qos.ch/access.html
which involves using logback-access. I followed the instructions, yet when I direct my browser to /mywebapp/lbAccessStatus I got a class def not found error. Apparently it can not find the logback-accesss-1.0.0.jar that I have put in TOMCAT_HOME/lib . Has anyone else experienced this issue after the following the tutorial, or have any other tutorials available that describe alternate methods of logback configuration? I do not mind if each web app has their own log file, or just one global one I would just like to see the package work. Thank you for your help.