How to configure the Kotlin bytecode inspector? - android-studio

I want to configure the Kotlin bytecode inspector code in AS 3.5 to use an older version of the Kotlin compiler. Is it possible?
Currently I have a Kotlin 1.1 project, and I'm interested in seeing what the bytecode looked like for certain features when Kotlin 1.1 was new. My problem is that it seems like the Kotlin bytecode inspector always compiles the source code according to the newest version of the Kotlin compiler.
I basically want to reproduce the results of this experiment.
Incase you can't configure the bytecode inspector to use an old version of kotlinc, is there another convenient way to reproduce the results of the experiment?

Related

Android Studio Lint for finding invalid component classes?

Long story short, Android Studio's new Refactor feature to Migrate to Android X is buggy. In the end, I ended up with dozens of invalid, incomplete, non-existent component classes in my XML files and the compiler didn't complain. Only when testing at runtime did I realize what it's done.
Is there a lint option to find invalid class names / component types so that it flags something like this (which does not exist):
<androidx.widget.AppCompatSeekBar>....</androidx.widget.AppCompatSeekBar>
The actual class name is androidx.appcompat.widget.AppCompatSeekBar. I've had to do a lot of manual find and replace, but I feel reluctant posting this as an update and break an app that was working perfectly before.

Intellisense not working properly for SPOCK framework in Eclipse Indigo

On Pageclasses (e.g LogInExample.groovy) user-defined or inbuilt methods or variables are not auto populated due to which it seems difficult to code.
For example when we write Checkbox. after putting this dot inbuilt methods should be auto populated which has not been done. Refer the attached screenshot for more information.
Intellisense not working properly
Intellisense is working fine for me in Keplar 4.3. Perhaps you want to try an upgrade of your IDE.

CodeContracts and resharper vs2012 not working

I have Resharper and it's a fantastic tool
Starting a projects and I need to use CodeContracts. However Resharper ignores them.
After checking a few blogs I came across this one:
http://www.infinitec.de/post/2010/11/18/Using-Code-Contracts-Visual-Studio-and-with-Resharper.aspx
However I get an error
Error 2
The command ""C:\Program Files (x86)\Microsoft\Contracts\Bin\ccrewrite"
"#MyProject.Coreccrewrite.rsp"" exited with code 1.
Has anybody managed to have codecontracts and resharper to work together?
Edited
What I am doing is
Trying to use codeContract and resharper gives a Method invocation is skipped etc..
Googled and found lots of people with same problem and no solution.
As you can see I attached a link that should have done the trick but didnt
Create a new project in vs2012 and try to use code contract and resharper will not let you.
It will be disabled and if you enable it you get another error
Comment from Resharper team on
http://youtrack.jetbrains.com/issue/RSRP-182553#comment=27-200330
ReSharper will not support "Code Contracts" as is in the mid-term
future. There are 2 main reasons for this:
CodeContracts are written in the code block, and, moreover, in the separate assembly. ReSharper requires contracts to be at the
metadata level
Current contract are too complex and are not supposed to be analyzed in real-time.
During ReSharper development, we analyze CodeContracts and building
corresponding ReSharper code annotation marks. We are going to extent
our annotations, and always keep them in-sync with contracts.
I am stuffed!!!

How can I get IntelliJ IDEA to recognize the GPars DSL?

According to the GPars User Guide, IntelliJ IDEA is supposed to be able to recognize the GPars DSL right out of the box as soon as the GPars jar is added to the project. Since Groovy 1.8, GPars is now included in the Groovy distribution, but adding that facet to the IDEA project doesn't seem to help.
Does anyone know how I can activate the DSL support? It would be really nice to have the DSL keywords recognized instead of having little underlines everywhere.
Note: I'm using IntelliJ IDEA Ultimate v11.1
It seems GPars jar from Groovy distribution doesn't contain gdsl script which teaches IDEA to work with GPars dsl.
The simplest thing you could do is to add this gdsl file in your project
http://git.codehaus.org/gitweb.cgi?p=gpars.git;a=blob;f=src/main/groovy/groovyx/gpars/Definitions.gdsl;h=49f6993221645e3d887e6bf99c3c0fc46afef69e;hb=b0155a809a5c9adf9de816f18121d5a60d4b455d

use subsonic 2.x and 3.x in the same project

Is it possible to mix them? I'm asking because I have a big project that uses Subsonic 2.x generated classes (in a compiled dll) but would like to start using 3.x for new stuff.
I tried it last night with a project where I had references to both subsonic.dll and subsonic.core.dll but that didn't work with ambiguous references, etc. So removed 2.x and then got an issue with my older compiled subsonic generated classes in that they needed Subsonic 2.1 to run.
Hmm... I think there's a small chance that you might be able to do this, but you'd need to use the full qualifying class names (namespace.class) for a lot of code because there might be naming conflicts. It wouldn't be easy to do and definitely not recommended. (It might not can even be done.)
You can't move from 2.x to 3.x without doing a lot of recoding. I have a bunch of big projects in 2.2 and after trying to update to 3.0, I ran into some issues so I've decided to keep them in 2.2. I'd love to upgrade to 3.0 and use the new stuff, too, but I don't have the time (right now) to recode the stuff that changed between 2.x and 3.0.
I do recommend updating to 2.2. There shouldn't be any backwards compatibility issues between 2.1 and 2.2. I was able to update to 2.2 by just changing out my reference.
Just curious, are you using ActiveRecord or Repo implementation?
You only have 2 options:
stay in 2.1/2.2
update your code to 3.0
Thought I'd follow up here and let people know that I was able to get this to work. What i chose to do was to edit the Subsonic 2 source code and put it into a Subsonic2 namespace (everything), recompile to subsonic2.dll, etc. Had to modify the web.config slightly, then went and modified my old code to reference subsonic2, etc.
Am now able to mix both Subsonic 2 and 3 in the same project.
Gerry
Jim--I'm using ActiveRecord. The 2.x is in one namespace and 3.x would be in another. However, I guess the question is whether the 2.x can be compiled to run with the 3.x runtime.
Thanks,
Gerry

Resources