When using Ember-cli-blanket for coverage data includes files from Ember itself instead of only files I created - ember-cli

I added ember-cli-blanket into my project and managed to get it working fine. localhost:4200/tests?coverage would show the coverage data. However it included files such as 'project/components/modal-dialog' or 'project/components/modal-dialog-overlay' in the results, which are not files in the project, but are included by Ember since the project uses a modal dialog in one of the template files. These extra test files don't give me anything new since I'm not testing the ember codebase and actually muddle the results by mixing in my tests with other ones. The project is still small, and with ~11 actual files needing testing, there were around 12 files I had to add to the loaderExclusions in blanket-options.js. Some could be gotten rid of with an exclusion like:
loaderExclusions: ['project/initializers'],
But for the ones under project/components, I do want to test the components that are part of the project, so I had to exclude each one individually. And there's no guarantee that excluding all initializers files won't come back to bite me if I actually end up with any files in there I want to test. Considering how small the project is so far, and the fact that there are more exclusions than actual files, this doesn't seem like a sustainable solution.
Am I doing something wrong in my set-up? Is this something I can solve with my filter which is currently on a default of:
filter: '/.*project/.*/',
Any help would be appreciated.
As a sidenote, I've been looking into testem with Istanbul as well as Karma as other options for coverage data in Ember but have been unable to get anywhere with them. If you have suggestions on the setup for those that would also be fine.

It doesn't look like there's anything wrong with your setup. What you're seeing is apparently due to how blanket.js works. See this issue for more information: https://github.com/sglanzer/ember-cli-blanket/issues/17

I was using ember-cli-blanket then found ember-cli-code-coverage. As of this writing, the sandersky fork, at 9f1dd33f, works great for me to solve the type of problem you're describing.
https://github.com/kategengler/ember-cli-code-coverage/pull/11
It solves it not using blanket, but using istanbul.

Related

Advice to fix 'No such module' issues for pods in Xcode project

I'm facing this No such module 'SomeModule' error in an XCode solution that I've inherited from some other developers. Initially the error is No such module 'ObjectMapper', but I find that if I swap the position of that line with the one below, it becomes No such module 'Alamofire'.
I've tried all the simple things suggested on this site (and others), making sure I'm opening the .xcworkspace file, deleting everything and re-installing (derived data, the whole Pods directory, etc.), updating cocoapods, etc.
I suspect that what's actually going on is that either the pods themselves aren't building, but for some reason the errors there are making their way to XCode's obtuse errors list, or that they are building but somehow not being linked correctly.
This is actually a project I've inherited from some other developers, so it's hard to know what weird or wonderful configuration they've done to break things. They are using an approach that I've not seen before where there's 3 build schemes for different environments (in this case Develop, Stage and Prod) then this kind of parent scheme for all the other three.
I've also tried going to 'Manage Schemes' then ticking the 'Show' checkbox for the Pods-Sunflower project. When I try to build just that project, I get a bunch of errors (mainly for Facebook, Google and Realm pods) that say things like:
Unable to load contents of file list: '/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-xcframeworks-input-files.xcfilelist'
I don't expect anyone will be able to provide me a set of steps on how to solve this issue (I mean, that would be great), but I am hoping that someone can help me find ways to just work out what the problem is here, like:
How can I verify that all the separate pods are actually building?
Is there some folder where I can see all the built pods?
When you get a No such module 'SomeModule' error, where is Xcode trying to find the modules (like, in the file system? where?)
Thanks. I know this is one of those perennial issues, appreciate any advice.
The solution which worked for me was:
First thing i do when i got project from another developer is make a copy of pods and completely delete following files
Podfile
Pods folder
Podfile.lock
xcworkspace
In case you already once use that same project try deleting derived data
After deleting pods, reinstall pods and open project and let xcode do indexing of your project and after indexing look left side where warnings and errors shows, In there sometime you just have to just click and update or convert whatever xcode suggesting.
Note: - Sometimes doing same thing doesn't work try changing sequence because its xcode sometimes become dumb. Also try restarting
Honestly in these situation all i do is hit and try.
But above steps generallt works for me.

TYPO3 Backend Website-Panel is looking strange and is not usable

our BE-website-panel is looking kind of strange.
And we can't use the filter or add-new-element functions which are shown.
(We are clicking through to the sites themselves)
I didn't find anything regarding this bug so here's a screenshot:
backend
Also here's a list of the extensions:
extensions
I fixed the problem, altough i can't tell you where the error originated.
I downloaded the typo3_src-8.7.2 source files and overrode all my files via ftp, because i compared the whole folder with phpstorm beforehand and some files were empty on my side.

Accidentally published CompositeC1 with precompile on

I accidentally published Composite C1 from Visual Studio with "Precompile during publishing" when I first set it up and have now come to realize that several plugins do not work with precompile turned on. Unfortunately I have no idea how to reverse this. I've tried several things to no avail. I usually end up with a 500.0 error. If I go to the admin interface everything is working properly, and I can even preview the pages, but from the customer side all I get is a 500.0 error.
Of course I could republish from the Visual Studio project I have, but that project has the default template on it. I've tried copying what appears to be changed on the server to the original project but I end up with a 500 error. I've tried removing all the precompiled stuff on the server but I end up with a 500 error. I'm pretty lost.
At this point I'm willing to do anything. Is there a doc explaining how to copy the content to a newly downloaded copy, kind of like an upgrade doc but "side-grading"? I am using the most current version at the time of writing this 4.2 Update 1
Thank you
Solved use the PackageCreator suggested by wysocki's answer. It was not exactly straight forward to create the package. The errors can very cryptic at times. So here are some of the issues I encountered and how I got past them:
wysocki was correct to suggesting starting with a bare bones installation even though my original project was started with the Venus theme. I tried both ways.
I encountered issues with the MasterLayout and the Page Template Features which are currently not supported by the PackageCreator, although they may be supported in future versions. The solution was to add the missing elements to the fresh C1 project from the original C1 installation in the App_Data/PageTemplates and App_Data/PageTemplateFeatures folders.
A few times I ran into an issue where I added the same page or function twice to the PackageCreator. This was obviously my fault, but it should be mentioned that you can add the same site element twice which throws and error on import. Make sure you are careful to only getting one of each when creating the package to be exported.
If you are getting and error and it uses and Id like "4061397b-ee9e-4512-984d-f2b2d41eb654" I've found that it was very helpful to extract the zip file you are trying to import and then search the extracted folders for that Id. The lines with the Id usually have more information on them that will help you to identify exactly what content page or whatever the error is being generated from.
If you are using installed packages in your project like SimpleSearch for example, make sure you don't add it's functions to the PackageCreator. Install them separately.
I had an issue where I somehow had an element in the Data section that didn't have a "type". The error simply "The type cannot be empty". This was obviously tough to find so I suppose the lesson is, less is more. If you think your project might have a few elements that are unnecessary, don't add them at first and see if the project you import them into complains about missing them. It's much easier to troubleshoot missing elements than it is to figure out which element is causing the issue that you really didn't need.
Is there a doc explaining how to copy the content to a newly downloaded copy
You can try and export content / templates / anything else related to a "package" via Composite.Tools.PackageCreator.
Its latest version gives you quite a lot of flexibility in what you can export ("package") - please its user manual.
Once the package is made and downloaded, you can go on and install it on a new website. If you export / import a lot of content / templates etc, it makes sense to have a "Bare Bones" site as the new one.
All the starter sites like "Neptune", "Venus" are installed as a bunch of packages in specific order during Composite C1's initial setup.

Groovy debugger out of sync

I am having a difficulty while attempting to debug some code in grails. It is difficult to put into text, so I have posted a screencast showing exactly what the problem is here. In short, while I am debugging the debugger starts jumping from place to place and not following the program logic I have in place. The only other similar question I have found is a year old, had no solution, and can be found here.
The best guess I have so far is that the debugger is displaying the text I have typed in, but is actually executing an older version of the class file which it has cached somewhere. Therefore, I tried:
cleaning the project
manually deleting all of the class files from the target folder and from the target-eclipse folder
Searching my entire hdd for additional files with similar names
removing my project from the workspace and re-adding it
closing and reopening the IDE
grails refresh-dependencies
Importing the project into a new IDE (I was using GGTS, I switched to IntelliJ)
None of those solutions had any effect. I realized that the issue was in a .groovy file, and I was writing almost pure Java, so I deleted the .groovy file, and re-created the class in a .java file. That solved my problem. Unfortunately I am having the problem again, and this time it is in a controller that heavily relies on the grails framework, so that solution is not an option. Other than also being in a .groovy file, another similarity is that the code breaks on an if statement.
My next steps:
Verify that the application is not executing the code I see by using print functions to monitor actual execution flow.
comment out the entire function and re-add functionality one line at a time to see if I can see what breaks it.
Delete the .groovy file, and re-create it as another .groovy file.
Any help is appreciated, and since I can't find any answers online I will continue to update this question as I learn more.
See my comment on the jira issue that you raised. You have found a problem with the groovy compiler and how it calculates line numbers. This is not a problem with executing the wrong class files or using a broken debugger. The debugger is doing exactly what it is expected to do. It is the compiler that is providing erroneous line number information.
The next step, as described in the issue, is to provide a simple project that recreates the bug. I tried to do so myself, but could not. So, please supply something that we can work with. Then we can notify the groovy compiler team.

NetBeans: should nbactions.xml, nb-configuration.xml and catalog.xml go into source control?

This thread is very useful for finding out which files in Netbeans should go into source countrol, but it doesn't cover all files.
In particular I'm wondering whether the following files should go into source control. Here are my assumptions/guesses:
nb-configuration.xml - easiest - the file itself in the comment says it should go into source control.
nbactions.xml - from what I see this file stores information typical to running the application. I.e. JVM arguments etc. So I suppose it is a question of taste - if you want other developers to have a "suggested" Run configuration - include it. Otherwise - don't. Correct?
catalog.xml - not sure what this does (I GUESS it's used by the editor to find out xml schemas and such to enable syntax coloring, but it's just a guess). Anyway - I see that this file has system-specific information (path) - so it shouldn't go into source control.
Can anyone confirm the above?
Thanks,
Piotr
I never put my IDE configuration files in the repository, for several reasons:
other colleagues may want to use theirs;
other colleagues may want to use other IDEs (such as Eclipse) and seeing those files (or even have to exclude them from the checkout) could be annoying for them;
some of these files are generally not related to a single project, others automatically generated, so no need to store them in the source code of every project.
In order to exclude them, our first solution was the .svnignore, but it was still logically wrong to modify some shared content for the specific needs of a single user, so we decided to be more strict:
in my ~/.subversion/config I have:
[miscellany]
global-ignores = nbactions.xml nbproject
Hope this helps,
Marcello
In my Maven based projects I put nbactions.xml into source control. Just make sure to change absolute paths to relative ones.
I put nbactions.xml into source control BUT there is a caveat: it's internal format can change so if your developers, for any reason, use different versions of NetBeans you could have to remove it because sharing it becomes nasty.
Recently I upgraded from NetBeans 7.3.1 to 7.4 and the "Run" action was giving a strange error message. I solved the problem by deleting and regenerating nbactions.xml: the old one had a custom Maven goal for the "Run" and "Debug" actions; it was org.codehaus.mevenide:netbeans-deploy-plugin:1.2.4:deploy it was not visible in the IDE v7.3.1 (perhaps it has been generated by an even older version for internal usage) and was generating a class not found for org.openide.util.Lookup in v7.4. I'm documenting the problem here because I found the solution by myself after an unsuccessful search on the Net. I hope this can help someone else.