Languages under plugin are not getting deployed to MPS - mps

I have built and added some new plugins to MPS and when I am trying to use them I am getting the following error "The language is not deployed 'com.abc.plugin.implementation'"
Anybody faced the similar problem and have a solution can help me?
MPS Version used: 2017.1.2
JDK: 1.8

Do you mean language plugins or other? If Yes can you find sources of your plugin (ctrl+alt+shift+S opens find module popup)? If there is no sources then plugin wasn't loaded. If you can find sources then probably some of language dependencies is not found (if any module in MPS has broken dependency then it won't be deployed). May be you build plugin with language, but didn't include it's runtime module.

This issue is a bug in MPS which is logged in youtrack as below:
https://youtrack.jetbrains.com/issue/MPS-26437
Layout node for plugin places all modules of a group under a single folder. If there's a devkit among the modules, only devkits are loaded (https://youtrack.jetbrains.com/issue/MPS-25852), and other modules are ignored.
Unless we've got devkits deployed as regular modules, not simple files, MPS could place these devkit files separately when deploying a module as a workaround.
This problem is resolved and available with commit # 2edca430f054c908eb7606bad8ac6af46e0a7352

Related

GrammarCells not found by Standalone IDE build script

What’s the right way to add a third-party dependency to the build file?
I’m trying to build a standalone IDE for a language that uses grammarcells as dependency, but I get an error saying that the dependency cannot be found during the build process.
cannot find used language in dependencies: com.mbeddr.mpsutil.grammarcells
The error only occurs for the Build Solution, in the language solution, I can use grammarcells without issues.
Grammarcells is loaded into my IDE
It is also in my Solution for the Standalone IDE
And model
However I get the same error every time I try to build the project
Any idea how to solve this problem?
To solve the problem, I did the following two steps:
First, I added de.itemis.mps.grammarcells.build to your build model.
Second, I added de.itemis.mps.extensions to the list of dependencies in my build script
Finally, Re-Build :)
Thanks to #arimer from the MPS slack channel for helping me to solve the problem.

How to compile node.js to binary release (with native modules)

Currently, I’m experimenting with building Node.js projects (different bundlers and other kinds of stuff). And I got a simple idea about bundling Node.js to a single binary for Linux, macOS, or Windows.
There are two packages nexe and pkg both of them don’t really support native .node modules that are used by packages like bcrypt or realm. Were you performing a similar compilation? I would be extremely happy to see some real-world examples (I could not find them on GitHub).
But... for what? It's more like an idea for fun what we're able to archive with Node.js. Even if it will be working (I get it working on cjs packages without native modules) example project with hello wold may have a size above 30MB.
One cool observation is that #vercel/ncc is able to compile my project into a single directory, but it also doesn’t work without node_modules (probably, I had no environment to test it)
Update V1: Building realm is impossible in such kinds of projects, the simplest solution is to not use realm in node apps because it will crash the binary build (it's because realm is using tons of other packages such as electron or react-native which doesn't work at all when it comes to desktop platforms.
My code is available at the following repository: https://github.com/keinsell/typecraft
After days of struggling with researching how pkg works and searching for potential alternatives, I've found caxa which were working for me in a good way, and on the road, I also got pkg working fine with (actually only tested on bcrypt) native modules. My core insights on using pkg for building Node.js binaries are:
Use matrix-builds on CI to build package ex. win package from windows host, mac from macos host etc.
Be sure to include native modules to assets (there you can use require() function in JavaScript (example below) or use pkg.assets object in package.json - I don't really get it but it's contained in my issue on vercel/pkg - vercel/pkg#1473
+ require('bcrypt/lib/binding/napi-v3/bcrypt_lib.node')
export async function main() { /* ... */ }
Some modules are still build-crashing, and the good example is realm but I'll still search for a way of building it and including it into node.js binary application. All of my progress on researching Node.js builds will be available on https://github.com/keinsell/typecraft and this StackOverflow answer will be updated over time and my new discoveries.
Read this resource with examples and you will be able to compile it to a binary release. Of course, nexe is necessary but with pty.js you can successfully compile it with all the native libraries. Have a look at the source: https://www.jedi.be/blog/2013/05/14/compiling-packaging-a-nodejs-project-as-a-single-binary/

Android Studio xmlns Error Debugging

I'm getting the following error compiling a program using a 3rd party library:
Error:(xx) No resource identifier found for attribute 'tint' in package 'com.example.mycompany.myapp'
The line xx is inside the xml layout that includes a custom component defined in the library.
cntrlco:tint="42"
The xml namespace documentation says I need the following:
xmlns:cntrlco="http://schemas.android.com/apk/res-auto"
Here's my best guess as to the problem, but if you think otherwise please let me know, this is a guess.
I suspect I don't have the library installed completely. The reason is that the library instructions want the library installed from maven. I'm not up on this technique, but it appears to be a web based auto install that automates dependency installs while performing the primary install. Nice idea, but I can't install using the web (long story), so I included the .aar file locally.
From my research, installing .aar files locally won't look at its dependencies. If this is true and the "tint" property is defined in a dependency, then this would explain the error I'm seeing.
Is there a way to follow the error chain in more detail so I can verify my theory? Along the way, will this help me find the name of the possible missing dependencies so I can see if including them fixes the problem.

Having source code for third party javascript libraries available whilst debugging

I would like to know whether it is possible to have third-party javascript libraries' source code available whilst debugging.
FYI, I use npm/nodejs and the angular CLI (which itself relies on Webpack).
Example libraries (together with their source languages) that I would like to have available during debugging are:
Angular 2 (typescript)
RxJS (typescript)
I guess what I want to achieve is related to configuring source maps.
Any comment or guidance welcome.
edit: Can someone please advise how to configure the angular CLI in order to have angular and RxJS typescript sources available whilst debugging?
Yes, to be able to set breakpoints in source files while debugging, you need sourcemaps. But this is not the thing that can be configured in the IDE, you need to set up your build tools accordingly. The only thing that should be configured on the IDE end is the run configuration - you might need to specify Remote URL mappings for your project directories
To complement lena's answer and as of #angular/cli version's 6.1 is it now possible to output source maps for vendor libraries using the following syntax:
ng serve --source-map --vendor-source-map
It also works for the ng build command.
See also: https://blog.ninja-squad.com/2018/07/27/angular-cli-6.1/
It is then possible to debug third-party libraries using an IDE or the browser.

cmake and isolated applications on windows

Considering a plugin system with the following installation pattern:
/install_prefix/main.exe
/install_prefix/plugins/plugin.dll
If my plugin depends on a library compiled as shared, its dll should be installed in the exe path:
/install_prefix/main.exe
/install_prefix/plugin_dependency.dll
/install_prefix/plugins/plugin.dll
I found isolated applications can be used to keep the dependency side by side with the plugin as follows:
/install_prefix/main.exe
/install_prefix/plugins/plugin_dependency.dll
/install_prefix/plugins/plugin.dll
This relies on a manifest file generated with visual. I am using cmake to generate my projects and I can't find any reference on a "good" way to handle isolated applications in a cmake file.
Did anybody have this use case?
EDIT:
This question propose answers on how to embed an already existing manifest file. What I would like is a way to generate the manifest file in the build process, in a perfect world with something as simple as installing exports. Something like:
install(
TARGETS target_name
MANIFEST target_name.manifest
)
This would generate the manifest file and embed it with the target.

Resources