MPS Standalone build can not be generated - broken reference 'module'

Hi Forum,

I have another strange question to ask since I do not know how to find the root of all evil.

My scenario is the following:
I have a build solution that contains one build project (Lang1), which builds a language that as a MPS plugin. - This works fine :)
I also have a separate build solution that was created with the build solution wizard that should create a MPS based RCP containing the language plugin I build in the first step.

Everything seems fine in the build project editors and there are no errors in the project. However, when i try to make the model for the RCP build I get the following error message:
broken reference 'module' in [children] BuildLayout_CompileOutputOf null[6715670961999425990] in RCPBuild.build@0 (target model is null)
-- – was input node: [children] BuildLayout_CompileOutputOf null[6715670961999425990] in RCPBuild.build@0
model "RCPBuild.build@0" has been generated with errors
generation completed with errors in 326 ms
Error executing target jetbrains.mps.lang.core.Generate.generate
"generate" target execution time: 326 ms
Other targets execution time: 1 ms; configure: 1 ms, preloadModels: 0 ms, checkParameters: 0 ms
Make failed. See previous messages for details.


When I click on the first line of that message the RCPBuild.build@0 files opens and shows the following lines were the error is in the line with the <no module> statement:
RCPBuild@0
...
folder languages 
  jar Lang1.jar 
    folder META-INF 
      xml file module.xml 
        <module namespace="Lang1" type="language" uuid="af9a773b-e317-44a4-aa4f-a8e6cb3e11e8"> 
          <dependencies></dependencies> 
          <sources jar="Lang1-src.jar" descriptor="Lang1.mpl"/> 
        </module> 
       
    compile output of <no module> 
    files from ./languages/Lang1 
      includes icons/**, resources/** 
     
  jar Lang1-src.jar 
    folder module 
      file ./languages/Lang1/Lang1.mpl 
...
prettyPrint();

My question now is, what do I need to specify in order to fix that <no module> null pointer?

Best regrads,
Phillipp
6 comments
Do you build Lang1 in both: Lang1 and RCP build scripts?
Or do you have dependency from your RCP build script to Lang1 build script?
0
Hi Michael,

yes, I have a dependency from the RCP build script to the Lang1 build script and list Lang1 also under the "idea plugin/content" in the RCP build script. If it is not listet there then the dependencies of the plugins contained in the RCP build are not satisfied.
0
Can you show your RCP build script? Here or send me by e-mail michael.vlassiev@jetbrains.com
0
Shure here you go:
RCP build script
build RCPEditor generates buildRCPEditor.xml 
 
base directory: ../../ 
 
use plugins: 
  java 
  mps 
 
macros: 
  var date = date yyyyMMdd 
  var build.number = LangEditor-139.SNAPSHOT 
  folder mps_home = <no defaultPath> 
  folder mps_project = <no defaultPath> 
 
dependencies: 
  mpsStandalone (artifacts location $mps_home) 
  mpsMakePlugin (artifacts location $mps_home/plugins) 
  mpsWorkbench (artifacts location $mps_home/plugins) 
  mpsExecutionPlugin (artifacts location $mps_home/plugins) 
  mpsDebuggerPlugin (artifacts location $mps_home/plugins) 
  mpsBuild (artifacts location $mps_home/plugins) 
  Lang1Build 
 
project structure: 
  idea branding LanguageEditorPlugin 
    codename LanguageEditorPlugin 
    company <no company> 
    version 0.1.<no bugfixNr>, eap true 
    full name Language Editor Plugin
    build number ${build.number}, date ${date} 
    icons 
      16x16 ./icons/MPS16.png 
      32x32 ./icons/MPS32.png 
      32x32 opaque ./icons/MPS32.png 
      128x128 <no icon128> 
    splash screen ./icons/splash.png textcolor 002387 
    about screen ./icons/about.png 
    dialog image ./icons/dialogImage.png 
    welcome screen 
      caption ./icons/caption.png 
      slogan ./icons/slogan.png 
      logo ./icons/logo.png 
    <no updateWebsite> 
    plugins <no plugins> 
    whats new <no whatsnew> 
    <no stats> 
    <no help> 
    feedback url <no feedbackUrl> 
   
  idea plugin LanguageEditorPlugin 
    name LanguageEditorPlugin 
    short (folder) name LanguageEditor 
    description <no description> 
    version 1.0 
    << no vendor >> 
    content: 
      LanguageEditor 
      Lang1Build/Lang1MpsGroup 
    dependencies: 
      jetbrains.mps.core 
      jetbrains.mps.ide.make 
      jetbrains.mps.build 
    << ... >> 
     
  mps group LanguageEditor 
    solution LanguageEditorPreferences 
      load from ./solutions/LanguageEditorPreferences/LanguageEditorPreferences.msd 
     
    solution LanguageRDFBrowser 
      load from ./solutions/LanguageRDFBrowser/LanguageRDFBrowser.msd 
     
    solution LanguageToServerPlugin 
      load from ./solutions/LanguageToServerPlugin/LanguageToServerPlugin.msd 
     
    solution GeneratedJavaSources 
      load from ./solutions/GeneratedJavaSources/GeneratedJavaSources.msd 
     
    solution ApacheJena 
      load from ./solutions/ApacheJena/ApacheJena.msd 
     
    solution JAXBExternalJar 
      load from ./solutions/JAXBExternalJar/JAXBExternalJar.msd 
     
    language XSDToJavaTypeLang 
      load from ./languages/XSDToJavaTypeLang/XSDToJavaTypeLang.mpl 
     
   
default layout: 
  import mpsStandalone::languages 
  import mpsStandalone::license 
  folder bin 
    import files from mpsStandalone::bin 
      include log.xml 
      include log4j.dtd 
    file $mps_home/bin/idea.properties 
      replace regex "\.MPS(\w+)" /g -> \.${build.number} 
     
  folder lib 
    import files from mpsStandalone::lib 
      exclude MPS-src.zip 
      exclude branding.jar 
    jar branding.jar 
      files of idea branding LanguageEditorPlugin 
       
  folder plugins 
    import mpsStandalone::plugins/svn4idea 
    import mpsStandalone::plugins/cvsIntegration 
    import mpsStandalone::plugins/git4idea 
    import mpsStandalone::plugins/mps-core 
    import mpsExecutionPlugin::mps-execution-languages 
    import mpsExecutionPlugin::mps-execution-configurations 
    import Lang1Build::Lang1.zip 
    plugin LanguageEditorPlugin 
      folder libs 
        files from ./solutions/ApacheJena/lib 
         
    # optional plugins 
    import mpsMakePlugin::mps-make 
     
  properties file build.number 
    build.number = ${build.number} 
    date = ${date} 
    version = 0.1 
   
   <<additional aspects>>
  
prettyPrint();
0
You should not put Lang1Build/Lang1MpsGroup into LanguageEditorPlugin content. Most probably Lang1 (the name of the idea plugin from Lang1Build script) should be in LanguageEditorPlugin dependencies (if LangaugeEditorPlugin depends on your Lang1 plugin).

The second point. You can make external dependency (dependency only on build artifacts) on Lang1Build instead of normal dependency on Lang1Build in the case you only have already built plugin available in the RCP build project.
0
Thank you for your help! This solved the issue.
0

Please sign in to leave a comment.