Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with component deletion in performance test #446

Open
tamasborbas opened this issue Oct 19, 2015 · 0 comments
Open

Problems with component deletion in performance test #446

tamasborbas opened this issue Oct 19, 2015 · 0 comments

Comments

@tamasborbas
Copy link
Member

If a component has been removed then its xtuml pair will be dirty. Then in CodeGenerationPhase we try to get dirty xtuml components' pairs but for removed xtuml component it will add null to the list of cpp components. When we iterate on this list and call executeCppCodeGeneration with null cpp component (the pair of the removed xtuml component) the method will throw IllegalArgumentException.

The problematic code snippet from CodeGenerationPhase

val dirtyComponents = changeMonitor.dirtyXTComponents

val cppComponents = dirtyComponents.map[ xtComponent |
    mcToken.toolchainManager.engine.cppComponents.getAllValuesOfcppComponent(xtComponent).head
]
if(mcToken.cppSourceFileContents == null) {
    mcToken.cppSourceFileContents = <CPPSourceFile, CharSequence>newHashMap
}
cppComponents.forEach[ cppComponent |
    val cppSourceFileContentsForComponent = mcToken.toolchainManager.executeCppCodeGeneration(cppComponent)
    mcToken.cppSourceFileContents.putAll(cppSourceFileContentsForComponent)
]

Note: Will high level package deletion also cause problems?

@tamasborbas tamasborbas added this to the Oct 2015 milestone Oct 19, 2015
@abelhegedus abelhegedus modified the milestones: Oct 2015, Nov 2015 Oct 30, 2015
@itsdani itsdani assigned itsdani and unassigned itsdani Nov 18, 2015
@itsdani itsdani modified the milestones: Dec 2015, Nov 2015 Nov 23, 2015
@abelhegedus abelhegedus modified the milestones: Dec 2015, Future Jan 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants