How do I write a Logary target for my .NET application? - f#

I am trying to get started with Logary. I need to write a new target and I have tried following the following tutorial https://logary.tech/tutorials. I have downloaded Logary.sln from https://github.com/logary/logary, but I am not able to build Logary.sln. When I build it I get 40 errors and all of them say: The command ""paket.exe" restore" exited with code 9009.
When I try to add the nuget Logary (latest 5.0) with NuGet manager I get NU1108: Cycle detected. Logary -> Logary (>= 5.0.0).
When I try following this https://logary.tech/logary-dotnet-quickstart I get 2 errors as well.
So, I am totally lost. What am I missing out? I will provide more information if necessary. I want to write a target in F# for my .NET application that would be sent as an event to Logary's centralised event storage.

I have used FAKE build and it worked OK. The problem was cause by some namespaces, which is fixed in the fake.

I seems that the problem is with the project name. Its name is the same as the referenced NuGet package. So to resolve this problem you should changed the project name and the build will succeeded.

Related

Build failed - Check imports - Dart Angular Tutorial - angular_tour_of_heroes - part 2

While following tutorail - Angular-dart tutorial - Tour of Heroes - part 2
with using IntelliJ IDEA in Windows 10 while using chrome, I got following error(s) -
[SEVERE] build_web_compilers|entrypoint on web/main.dart (cached):
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).
Please check the following imports:
import 'package:angular_app/app_component.css.shim.dart' as import0; from angular_app|lib/app_component.template.dart at 12:1
[SEVERE] Failed after 1.3s
Serving web on http://localhost:53323
I have checked multiple times & I have replaced all - 5 files - namely
lib/app_component.css, lib/app_component.dart, lib/app_component.html, lib/src/hero.dart & lib/src/mock_heroes.dart from Review the app structure but I am still getting the above mentioned error & -
I could not find any app_component.template.dart
Nor could found any instance of imported package:angular_app/app_component.css.shim.dart or shim using IntelliJ Find in Path (Ctrl+Shift+F)
I have tried to delete build and rebuild.
I have also re-installed dart 2.1.0 using windows package manager & changed the location of dart-sdk accordingly in IntelliJ IDEA Settings/Dart, as for brief period I was getting dart-sdk error, but that is fixed.
This my first time asking question on stacksoverflow, but I have checked similar questions, could not resolve that issue.
the most likely reason for that build failure is due to the stylesUrls files not being found. This could be because the name in that array doesn't match the name in the file system or is not the expected place in the file system.
To confirm, I started from scratch, downloaded the quickstart-master.zip to get the project structure.
And followed the steps all the way through the step you were stuck on.
The only time I was able to generate that error while following the steps is when I added thestyleUrls: ['app_component.css'], to app_component.dart prior to creating the file.
I got the same:
[SEVERE] build_web_compilers|entrypoint on test/app_test.dart.browser_test.dart:
Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).
Please check the following imports:
import 'package:angular_app/app_components.css.shim.dart' as import0; from angular_app|lib/app_component.template.dart at 12:1
Once i created the css file, the error went away and everything worked fine.
I completed the entire step you were up to and my app was working fine.
I then did as you did and copied each file from the step and replaced my work with it, still worked.
So confirm my hunch, i changed the name of the css file, and received the same error.
regarding app_component.template.dart that file is auto generated by dart and can be found in your project under .dart_tool/build/generated/angular_app/lib
I had a very similar problem. I ran webdev build and then webdev serve and it fixed it right up.

Nativescript with AppBuilder plugin update

I am developing an app using nativescript with AppBuilder and Visual Studio. I am using a plugin called nativescript-pdf-view (https://github.com/Merott/nativescript-pdf-view). Everything worked fine until Apple changed one of their methods in xCode 8. See http://fluentreports.com/blog/?p=401 for details.
I have submitted a question to the author of the plugin 5 days ago, but have not received an answer yet, so I decided to make the change in the plugin code myself. The change is very simple, but after the update when I load the app to my test device, I still get the same error.
My question is: How does AppBuilder build plugins? Is it enough to update source code of the plugin to update it? How can I force the AppBuilder to rebuild this plugin?
I have a feeling the the plugin is cached somewhere because I get the same error message and stack trace even though the source code is changed.
Any suggestions are greatly appreciated.
In order to use a custom plugin in your project you have to update the reference in your package.json. For example in your case, you can:
Get the source code of nativescript-pdf-view.
Fix the issue you've noticed.
Build a .tgz from your modified source code (npm pack command should help you to create a .tgz).
Include the .tgz in your project (for example at the root level, right next to package.json).
Reference the .tgz in your package.json, so instead of having "nativescript-pdf-view": "1.0.0", you should have "nativescript-pdf-view": "file:nativescrip-pdf-view.tgz".
Build your project.
This way the custom plugin will be used instead of the one from npm.
There's no caching of plugins in the cloud builds. The process uses your package.json to install required dependencies.

Couldn't get Xamarin projects working with Rider-EAP on OSX

I was really excited, when JetBrains launched the Project Rider-EAP. First thing I've tried was to get a Xamarin-iOS project to run in Rider-EAP, but it doesn't work out of the box.
Update 1: This issue is now listed as critical bug with fix in EAP 2: https://youtrack.jetbrains.com/issue/RIDER-618
1. Problem (fixed) Projects didn't load with the exception that Xamarin.iOS.targets could not be found.
I fixed this with a simple Symlink:
ln -s /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/ “/Applications/Rider EAP.app/Contents/lib/ReSharperHost/macos-x64/mono/lib/mono/xbuild/”
2. Problem
References are not loaded correctly. Therefore the whole syntax highlighting and everything beyond is broken.
See screenshot: References are not loaded correctly
I get the following error as well:
Error:null: Error initializing task MakeDir: Could not load file or assembly '/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Tasks.dll' or one of its dependencies
Switching the xbuild to mono 4.2.2 removes the error but not solves the problem.
PS: It seams that the references are loaded correctly for Xamarin Android projects.
Basic Xamarin Support like open and build is added with EAP 8 of Project Rider.
More advanced features will come with the next Builds and are tracked here: https://youtrack.jetbrains.com/issue/RIDER-1533

Dagger 2 compile time error on CI

I've been using Dagger 2 recently and just did some work with scopes in my android project, adding scopes for Activities. While everything runs, builds and tests fine on my own machine. I'm getting a compile error on Jenkins CI.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Adverts:compile***DebugJava'
.java.lang.ClassCastException: java.lang.String cannot be cast to javax.lang.model.type.TypeMirror
This is strange because the build has worked fine up until now with Dagger 2 just with less code being generated. When I navigate to the generated sources some, but not all of the code is generated. It looks like it's crapping it out somewhere along the way. Both CI and my machine are using the same version of JDK.
Has anybody ran into issues with CI & Dagger 2 before?
For people in the future who encounter this error as well, it's most likely because of a class you deleted or a class that doesn't exist that is being referenced in your Module.
I had the exact same error while compiling when I had code like this:
#Module(includes = {
AModuleThatDoesntExist.class
})
public class YourModule {
}
So what I'm saying is: if you encounter this error, check your Dagger modules and bootstrapper code, there's probably some invalid code there.
As to why it works on your machine and not on the CI server: I don't know. I would guess it's because of some cache issue where the .class file of your deleted .java file is still present on your local filesystem, so Dapper can find it, but it doesn't exist on your CI server. If you can still reproduce the issue, maybe you can try running "Rebuild" and see if the errors occurs locally too.
Whatever happens Dagger 2's annotation processor shouldn't throw an exception so assuming that is coming from the Dagger 2 annotation processor it might be worth raising a bug if you can create a reproducible example, preferably a simple one.
As others have suggested do a clean build (remove the classes yourself to make sure that they are all gone) and check for differences between your machine and the CI one.

"Groovy:unable to resolve class ..." (import error in LoginController.groovy)

I am trying to use the ":spring-security-core:2.0-RC2" (using Grails version 2.3.1), but have my own LoginController.groovy. Following Burt's notes (here and here), I copied the LoginController.groovy from the original location at "myapp\target\work\plugins\spring-security-core-2.0-RC2\grails-app\controllers\grails\plugin\springsecurity" to my project location at "myapp\grails-app\controllers\com\company". Now I get a bunch of import error messages like "Groovy:unable to resolve class ..." (I have attached am image below showing all the imports giving errors). How do I take care of these errors?
Sorry if this is a trivial question (still getting used to Grails), and thank you for the help!
It looks like GGTS/STS isn't entirely aware that the plugin is installed, since those classes are from the two jars that the plugin depends on. Try right-clicking the project node in the tree and running Grails Tools > Refresh Dependencies. If that's not enough, run Project | Clean to force a full recompile.

Resources