go to post Colin Brough · May 1 Thanks for replying: Not really what @Brett Saviano, one of the ISC maintainers of the VS Code extension, said in previous discussion on the extension's github page. Yup But how? Try and edit, using either Studio or VS Code, to produce a '//XXX' comment (no space) outside a method definition. You can't do it - the space is generated by the editors without your intervention. Hence my question - how did that space get into Ensemble in the first place? Yup In principle its not just commented out Property's, it seems to be any '//' comment with no space after the '//' when that comment is not within a method (or classmethod) definition. And finding the couple of hundred classes with such comments across a 4000 class file production is a non-trivial exercise!
go to post Colin Brough · Apr 30 Sorry, should have linked earlier discussions: VS Code ObjectScript extension error | InterSystems Developer Community | Request textDocument/documentSymbol failed. Error: name must not be falsy · intersystems-community/vscode-objectscript · Discussion #1530
go to post Colin Brough · Apr 30 Hmm, attachment isn't showing. Tried again, didn't work, so have pasted the text of the export file below: <?xml version="1.0" encoding="UTF-8"?><Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2018.1 (Build 184U)" ts="2025-04-30 08:23:56"><Class name="SCI81.s1.PatientNotification"><Description>Created from: http://fv-testscistore/storews/store81/scistoreservices.asmx?WSDL</Descr...<ProcedureBlock>1</ProcedureBlock><Super>%SerialObject,%XML.Adaptor</Super><TimeChanged>63768,58466.681212</TimeChanged><TimeCreated>63767,58804.718434</TimeCreated> <Parameter name="ELEMENTQUALIFIED"><Default>1</Default></Parameter> <Parameter name="NAMESPACE"><Default>http://www.show.scot.nhs.uk/isd/SCIStore</Default></Parameter> <Parameter name="XMLNAME"><Default>PatientNotification</Default></Parameter> <Parameter name="XMLSEQUENCE"><Default>1</Default></Parameter> <Property name="PatientID"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="PatientID"/></Property> <Property name="MergeID"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="MergeID"/></Property> <Property name="EventType"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="EventType"/></Property> <Property name="Consent"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="Consent"/></Property> <Property name="TransactionType"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="TransactionType"/></Property> <Property name="CHI"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="CHI"/></Property> <Property name="RecordType"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="RecordType"/></Property> <Property name="RecordKey"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="RecordKey"/></Property> <Property name="ProcessEvents"><Type>%String</Type><Parameter name="MAXLEN"/><Parameter name="XMLNAME" value="ProcessEvents"/></Property> <UDLText name="T"><Content><![CDATA[//Property any As list Of %XML.String(XMLNAME = "any", XMLPROJECTION = "ANY") [ SqlFieldName = _any ]; ]]></Content></UDLText> <Storage name="Default"><Type>%Library.CacheSerialState</Type><State>PatientNotificationState</State><StreamLocation>^SCI81.s1.PatientNotificationS</StreamLocation><Data name="PatientNotificationState"><Structure>listnode</Structure><Subscript/><Value name="1"><Value>PatientID</Value></Value><Value name="2"><Value>MergeID</Value></Value><Value name="3"><Value>EventType</Value></Value><Value name="4"><Value>Consent</Value></Value><Value name="5"><Value>TransactionType</Value></Value><Value name="6"><Value>CHI</Value></Value><Value name="7"><Value>RecordType</Value></Value><Value name="8"><Value>RecordKey</Value></Value><Value name="9"><Value>ProcessEvents</Value></Value><Value name="10"><Value>any</Value></Value></Data></Storage></Class></Export>
go to post Colin Brough · Apr 11 An update in 2 parts: Some of the code in our repo is non-canonical ObjectScript (eg it has examples of '//ABC' comments, with no space, in the files in the repo; these are canonicalised to '// ABC'). So when imported into Ensemble via the VS Code extensions, it is "canonicalised" and subsequently shows as changed in relation to what was in the repo. This is our problem, not a bug, but we've no idea why it occurred in the first place! In the course of investigating it we stumbled on the ObjectScript Language Server error above, and I've subsequently been able to isolate it at least to the point of making it reproducible. There is further discussion on the GitHub discussion forum, including instructions for how to reproduce. As result I'm going to mark this as answered, because further exploration will be done from stuff on the GitHub forum.
go to post Colin Brough · Apr 10 I'm also seeing the Language Server output disappearing from the drop-down now! @Brett Saviano is responding more fully on the GitHub forum linked above.
go to post Colin Brough · Apr 10 Thanks for looking. Realised that I gave the version number for the ObjectScript extension (3.0.1), but not for the Language Server (2.7.2). And as you've highlighted its the language server which is giving me the error.
go to post Colin Brough · Mar 26 Thanks, @Enrico Parisi, that looks a good starter for the kind of thing we are exploring.
go to post Colin Brough · Mar 26 Thanks for the link, but as we are stuck on Ensemble (not Iris), we can't make use of this.
go to post Colin Brough · Mar 25 Thanks, that's helpful. Our end goal was the perennial XML to JSON conversion conundrum, or HL7 to JSON, and as we're currently stuck on Ensemble 2018, we've not got access to %JSON.Adapter, so we're... limited. Our immediate goal was, given a particular message/document, visit all nodes holding data within the document (traverse the tree), and do some processing for each node - eg output a JSON representation of the data held at that node so that a JSON serialisation of the whole document can be produced; but the general case, not just the JSON case, is of interest. Current application is taking an HL7 feed and sending (a subset of) the data in the HL7 and sending to be consumed by a downstream system via a REST web-service. The downstream in this case is being developed by another team within our organisation, and they can take XML - we've built a transformation to extract the relevant data into an EnsLib.EDI.XML.Document, and we've developed an XML schema for the data so we can validate it before sending on. But it would have been easier for them to consume JSON, so we were exploring how to do that - and are conscious that future requirements might include sending JSON rather than XML...
go to post Colin Brough · Mar 17 Thanks @Eduard Lebedyuk , that was helpful. As you describe, headers are not re-used from a previous call. On closer inspection, our confusion arose from the fact that if you provide a set of credentials as a setting on the operation which is implemented by EnsLib.HTTP.OutboundAdapter, even if you don't explicitly set the Basic Authentication headers yourself, they are created for you by the adapter using the provide credentials - we didn't realise this, and so when we removed our own explicit setting of the headers (for testing) we were confused by the headers still arriving in the downstream system!!
go to post Colin Brough · Mar 5 Update: this was answered by @Brett Saviano on the GitHub discussion forum for the VS Code extension: Should the extension change line feeds on compilation? · intersystems-community/vscode-objectscript · Discussion #1495
go to post Colin Brough · Feb 25 I was going to respond and say something like, "I'm sure that does answer the question, but I'm not sure I understand the answer!" So thanks for the executive summary! And thanks @Robert Cemper for the background information.
go to post Colin Brough · Jan 29 With help from WRC, looks like this is something of our own doing - we were using sub-transforms in ways that caused us problems. Our sub-transforms above were outputting whole new XML documents, when at the very least they should have been taking existing partially produced XML from the top-level transform and using that existing document to output. We "solved" the node ordering issue by moving everything into a single transform, so there was no mismatch between top level and sub-transforms.
go to post Colin Brough · Jan 29 For the sake of other people being able to find an answer, we took this up with WRC. Suspicion is this is a bug/aberrant behaviour in Ensemble (and they suspect recent versions of Iris). WRC were going to check in with development, and we are still waiting to hear back from them around that.
go to post Colin Brough · Jan 13 Note that this issue arises in a transformation we are also having other, we suspect unrelated issues with, discussed here: DTL Transformation output: maxOccurs bug? | InterSystems Developer
go to post Colin Brough · Jan 10 Its a virtual document: EnsLib.EDI.XML.Document, with the XML schema applied having been loaded into Ensemble via Ensemble -> InterOperate -> XML -> XML Schema Structures.
go to post Colin Brough · Jan 10 Thanks @Enrico Parisi and @Jeffrey Drumm - knew there'd be a way of dodging the limitation!
go to post Colin Brough · Jan 10 Additional info: if we change the order of <allergies> and <patientNotes> in the schema, it does not change the order of elements produced in the XML.
go to post Colin Brough · Nov 22, 2024 If only MSH-18 were set... 🙄 Up-stream system isn't setting it! And until yesterday supplier of upstream system was claiming they were sending UTF-8 when we thought the feed looked awfully like Windows-1252. Yesterday they admitted/confirmed they are sending Windows-1252, so at least now we know!!