Jump to content

Use of 'name' attribute in YAML container.

Recommended Posts



I'm thinking about the feasibility of implementing an external parser for Semantic Merge for F# - this *might* handle code that defines anonymous functions.


Looking at the container definition in the description of the generated YAML file, is it absolutely necessary to populate the 'name' attribute - or can the core Semantic Merge engine work with anonymous containers?


My guess is that it can, because the names can change for a construct between files due to renaming, but I'd like to check first....






Link to post
Share on other sites
  • 3 weeks later...
Hi Gerard,


It sounds good!


The name of the declaration (container or terminal node) is required but you can set a default value.

SemanticMerge uses this field for two purposes:

* identify the declaration and show it on GUI.

* improve the matching declaration process; it tries to match declarations with the same name (of course, they must be the same type), otherwise it tries by similitude.

In other words, when you specify the name of the declarations you make the matching process easier but this is not always possible.


Please, write us if you need a trial license for the external languages :)


Best regards,


Link to post
Share on other sites

Hi Míryam,


OK - I'll see if I can use the function arguments as a substitute for the name: so for "(fun x y -> .........)", the name would be "fun x y", likewise "(function (x, y) -> .....)" becomes "function (x, y)". This help match up refactorings that move anonymous functions.


If there's a problem with whitespace in the name, I'll think of a workaround or perhaps just fall back to stating 'anonymous function' as a name.


Thank you for the trial license offer - I've got a fully paid license for Semantic Merge for C#, I'm not sure what will happen if I'm implementing an F# plugin myself. :-)


I'll give it a try when I've got something ready to test and I'll be in touch if I need an additional generic license.


Kind Regards,



Link to post
Share on other sites
  • 2 months later...

Hi Míryam,


Thanks for your help both here and via E-mail: I've managed to get a proof-of-concept going; some screenshots are attached.


The source code for the plugin as at GitHub: https://github.com/sageserpent-open/SemanticMergeFSharpPlugin


Perhaps some other people would be interested in forking the repository and filling out the support for the F# constructs handled by the plugin, I can see https://plasticscm.uservoice.com/forums/196398-semanticmerge/suggestions/3839730-f-support ?


I will write an introduction to the plugin with a view of getting other developers to contribute in the next week or so...


Kind Regards,









Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...