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

XSD Schemas are empty, 404 error, broken links #2751

Closed
pubmikeb opened this issue Dec 8, 2019 · 13 comments
Closed

XSD Schemas are empty, 404 error, broken links #2751

pubmikeb opened this issue Dec 8, 2019 · 13 comments
Assignees

Comments

@pubmikeb
Copy link

pubmikeb commented Dec 8, 2019

OpenUI5 version: 1.73

I'm trying to download the XSD-schemas of the OpenUI5 with the UI5 Schemas NPM module but get a permanent error.

I tried to get schemas with ui5-schemas --sdk openui5 and with ui5-schemas --sdk sapui5, both of them fail:

C:\Users\User\IdeaProjects\PROJ>ui5-schemas --sdk sapui5
ui5-schemas info Attempting to download latest version of 'sapui5'. Determining latest version...
ui5-schemas info https://sapui5.hana.ondemand.com/resources/sap-ui-version.json
ui5-schemas info Detected version of sdk 'sapui5' is '1.72.1'
ui5-schemas info Preparing 'sapui5' schemas in version '1.72.1'...
ui5-schemas info Yay, all schema files were successfully downloaded!
ui5-schemas info [enhance] Making schemas even cooler...
ui5-schemas info [link] Discovered an .idea project! Registering schemas...
ui5-schemas error TypeError: Cannot read property 'filter' of undefined
at C:\Users\User\IdeaProjects\PROJ\node_modules\ui5-schemas\lib\link.js:63:44
at Parser. (C:\Users\User\IdeaProjects\PROJ\node_modules\xml2js\lib\parser.js:303:18)
at Parser.emit (events.js:302:20)
at SAXParser.onclosetag (C:\Users\User\IdeaProjects\PROJ\node_modules\xml2js\lib\parser.js:261:26)
at emit (C:\Users\User\IdeaProjects\PROJ\node_modules\sax\lib\sax.js:624:35)
at emitNode (C:\Users\User\IdeaProjects\PROJ\node_modules\sax\lib\sax.js:629:5)
at closeTag (C:\Users\User\IdeaProjects\PROJ\node_modules\sax\lib\sax.js:889:7)
at SAXParser.write (C:\Users\User\IdeaProjects\PROJ\node_modules\sax\lib\sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (C:\Users\User\IdeaProjects\PROJ\node_modules\xml2js\lib\parser.js:322:31)
at Parser.parseString (C:\Users\User\IdeaProjects\PROJ\node_modules\xml2js\lib\parser.js:5:59)
at registerLibs (C:\Users\User\IdeaProjects\PROJ\node_modules\ui5-schemas\lib\link.js:33:12)
at C:\Users\User\IdeaProjects\PROJ\node_modules\ui5-schemas\lib\link.js:98:11
ui5-schemas info [enhance] Enhancing done!

Besides that, some of the downloaded schemas files are empty — it's just 1 KB files with HTML regarding 404 error.

Could you please fix the schemas or provide a direct link to all XSD Schemas for the specific version of UI5.

Related issue: ui5experts/ui5-schemas#47

@petermuessig
Copy link
Contributor

Hi @pubmikeb ,

sorry, but I need mention, that we have abandoned the support for Eclipse (see https://twitter.com/pmuessig/status/1199687708702126080?s=20). The XSD schemas have been mainly build to support code completion for XMLViews in Eclipse and were never public nor officially supported since they didn't work in a satisfying way.

Related issues: #2074, #1971, #1178, #1176, #886, #363, #201, #7 .

One more internal reason I'd like to share with you: we are switching from the Maven build tooling to the UI5 Node-based tooling and we have to rewrite a lot of Maven plugins to Node build modules. The XSD was an early try to ensure code completion for XMLViews but they did never work good (as mentioned above). It might be even better to handle the XSD generation in an open-source project based on the API information we generate during our Node build (api.json) which is available per library, e.g. the api.json of sap.ui.core.

For now, the fastest workaround might be to stick with the 1.71 schema files. 1.71 is the latest long term support release.

But we will get in touch with @cschuff to discuss how we can continue to support his project ui5-schema. As said, there are other opportunities how to extract the schema related information and ui5-schema could use this to create the XSD.

Best regards,
Peter

@pubmikeb
Copy link
Author

pubmikeb commented Dec 8, 2019

@petermuessig, thanks for the detailed information regarding Eclipse support plans.
Actually I'm using IDEA/WebStorm, which, as I understand, also uses XSD for XML code suggestions.

Are there any ideas/alternatives for the IDEA/WebStorm users besides SAP WebIDE?

@petermuessig
Copy link
Contributor

petermuessig commented Dec 8, 2019

With the UI5 Tooling we plan to be IDE agnostic - means that having a CLI tool allow you to use it within VSCode, Atom, Eclipse, SAP Web IDE or WebStorm (or any other editor of your choice). For the code completion, we are looking into several directions, e.g. supporting TypeScript for UI5 which is also agnostic to the IDE you are using. Regarding the XSDs I will check with @cschuff whether we can contribute the generation of the XSD to the OSS community and eventually make it part of the ui5-schema project.

@pubmikeb
Copy link
Author

pubmikeb commented Dec 8, 2019

Thanks for such inside, adopting TypeScript sounds promising.
Is there some roadmap when the UI5-TypeScript bundle will be in GA and will be based on the currently stable UI5 version?

@petermuessig
Copy link
Contributor

Somewhen in 2020, it depends on how fast we progress here. I will also try to write a UI5ers buzz soon on that. Stay tuned... :-)

@pubmikeb
Copy link
Author

pubmikeb commented Dec 8, 2019

Great, then this ticket can be considered as obsolete since the XSD is going to be a legacy.

@petermuessig
Copy link
Contributor

Ok, I will close the ticket - but I will follow up with @cschuff on the XSD support as OSS.

@petermuessig
Copy link
Contributor

@pubmikeb : thanks for your understanding - if I miss to write the outlook on TypeScript till beginning of January you can just ping me... 😄

@petermuessig petermuessig self-assigned this Dec 8, 2019
@codeworrior
Copy link
Member

@pubmikeb if you're willing to experiment, please give the following schemas a try:

schemas.zip

They have been generated from the api.json files provided at https://openui5nightly.hana.ondemand.com. I've tested them successfully in VS Code with XML Support by Red Hat installed. But I would be interested to know if they fit your needs, too.

@vobu
Copy link
Contributor

vobu commented Jan 14, 2020

I've tested them successfully in VS Code with XML Support by Red Hat installed.

thanks for compiling the .xsd's!!!
I set this up with the schemas you provided (hint for whoeverTriesThisAsWell: I had to set both xml.java.home and add an entry to xml.catalogs that points to catalog.xml from the .zip).
Here's ad-hoc feedback :)

  • sap.m.Panel's content aggregation is reported as "invalid element name"
  • sap.m.Page's content aggregation is reported as "invalid element name"
  • sap.m.Title has wrappingType listed as attribute instead of wrapping

not related to the schemas: when using multiple namespaces in an XML view, the Plug-In's autocompletion doesn't provide all available controls

openui5bot pushed a commit that referenced this issue May 8, 2020
…ription

Change-Id: Id25de3c77007575c82cceeeb304a1be21fd1f089
demo-kit-feedback: #2751
@timostark
Copy link

timostark commented Mar 1, 2021

@vobu @codeworrior : I am also really interested in a XSD based validation for VSCode. Are there some news on this topic? I checked the provided schemas, but honestly the VS Code Plugin by RedHat seems not to be able to work with the size of the xsd files (slow does not really describe the user experience). Also I would prefer to work on a more "official" version of these XSD files. Are there any updates on this?

Thanks a lot,
Timo

PS: I see i see ( https://marketplace.visualstudio.com/items?itemName=SAPOSS.vscode-ui5-language-assistant )

@vobu
Copy link
Contributor

vobu commented Mar 2, 2021

PS: I see i see ( https://marketplace.visualstudio.com/items?itemName=SAPOSS.vscode-ui5-language-assistant )

yep, that's as close as it gets. but w/ static 1.71 typings, hopefully updating or adjusting dynamically in the future. probably @IObert know more on this?
there's also https://marketplace.visualstudio.com/items?itemName=iljapostnovs.ui5plugin which i personally haven't tried (yet).

@IObert
Copy link

IObert commented Mar 2, 2021

I'm afraid I don't know either :(
Maybe you can open an issue in the project's GitHub repo and ask for the roadmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants