cancel
Showing results for 
Search instead for 
Did you mean: 

KX Analyst - exporting modules as instructions to control

adrianosm_
New Contributor III

This is one for the KX developers.

In KX Analyst 4.6, exporting a module to KX control as an instruction might  rearrange the order of the functions in the result script. This is very annoying because git thinks that some functions were deleted and rewritten when in fact they were not touched at all. It would be great if the export did not rearrange the order of the functions - maybe export them in alphabetical order since they are displayed as such in KX Analyst? My question is: is this an known issue? And if not, I hope someone pass this to the responsible team so they can consider that as feature / fix.
Kind regards,
Adriano

1 ACCEPTED SOLUTION

leah_marie_s
Moderator Moderator
Moderator

Hello Adriano,

Great question. Thank you for getting us thinking here. 

The export order is determined by the most recent modifications in the workspace. The order of records in the workspace itself is appended last and the export is simply getting that order, and not calling out to sort. 

The exporter may additionally order types, like functions before data and sort the data based on dependencies. However, the functions are likely unsorted as you are observing.  

To answer your question, this was not an issue currently being investigated but your observation and suggestion has been noted and our developers are now aware of this as an issue for consideration.

Thank you very much for your continuous contribution and making a difference here on our community platform. 

Kind regards,

Leah 

View solution in original post

3 REPLIES 3

leah_marie_s
Moderator Moderator
Moderator

Hello Adriano,

Great question. Thank you for getting us thinking here. 

The export order is determined by the most recent modifications in the workspace. The order of records in the workspace itself is appended last and the export is simply getting that order, and not calling out to sort. 

The exporter may additionally order types, like functions before data and sort the data based on dependencies. However, the functions are likely unsorted as you are observing.  

To answer your question, this was not an issue currently being investigated but your observation and suggestion has been noted and our developers are now aware of this as an issue for consideration.

Thank you very much for your continuous contribution and making a difference here on our community platform. 

Kind regards,

Leah 

View solution in original post

Hi Leah,
Thanks for getting back to me and let me know how the export order is determined 😄
Hopefully this will be addressed in the future.

For whoever is reading and is interested: my interim fix for this is: I just reorder the exported file by hand using git diff on VSCode whenever I see functions that were reordered automatically by the exporter.

Cheers,
Adriano

Happy to help, Adriano. 

Great point brought to our attention. Thank you for sharing your interim fix with the community. 

Have a great day.

Kind regards,

Leah