intersystems-community / vscode-objectscript

InterSystems ObjectScript extension for Visual Studio Code
https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls?KEY=GVSCO
Other
108 stars 49 forks source link

Improvements to ObjectScript compile flags #532

Closed isc-solon closed 3 years ago

isc-solon commented 3 years ago

I'm 99% sure that the "c" option is redundant and can be removed. The other typical options should be documented a little. I propose this. Assign to me and I'll do it.

    "objectscript.compileFlags": {
      "type": "string",
      "default": "buk",
      "description": "Compilation flags: b - compile dependent classes, u - skip compilation of up-to-date classes, k - keep generated source code."
    },
daimor commented 3 years ago

I'm against having b by default. In some cases, it may be too heavy.

isc-solon commented 3 years ago

OK, so how about the default being "uk" and adding the description?

daimor commented 3 years ago

for now, it's cuk, so, just removing c flag. If it's really redundant and will work on any supported version 2016.2+ without it, it's ok to remove it. And I think, would be better to add a direct link to documentation, instead. Unfortunately, the documentation does not has the direct link, to just compile flags https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=RCOS_vsystem#RCOS_vsystem_flags_qualifiers

isc-solon commented 3 years ago

There's also this doc for the options in Studio, but I don't think it's right to use Studio doc for VS Code. https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GSTD_OPTIONS#GSTD_Options_Class If we document these options in the VS Code - ObjectScript doc on GitHub I guess we could link to that. But I re-suggest just adding the 3 common options to the description, since I think that will be the easiest and most helpful.

isc-solon commented 3 years ago

I confirmed with Development that the "c" option is redundant when calling any of the Compile() methods. So it can definitely be removed from the default options. What about the description?

gjsjohnmurray commented 3 years ago

Re the description, it could link to https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GOBJ_classes#GOBJ_classes_compile_flagsetc or simply advise the user to run Do $System.OBJ.ShowFlags() in a Terminal on the target server.

isc-solon commented 3 years ago

As I look through the other settings for the extensions, I see longer (but not toooo long) descriptions. For example:

Category of source code to export: CLS = classes; RTN = routines; CSP = csp files; OTH = other. Default is * = all.

<soapbox> So why can't I convince you to change the not-very-informative "Compilation flags" description to my suggestion above? The developer doesn't need to look through all possible flags, they don't need to wonder about the difference between flags and qualifiers if they read this ("flags have been superseded by qualifiers"), they don't need to take the extra steps to start a Terminal and run ShowFlags(), they don't need to read through detailed documentation. Studio and Atelier both provide information about these 3 flags in the place where they get set. Why can't VS Code - ObjectScript do the same? </soapbox>

isc-bsaviano commented 3 years ago

@isc-solon I just submitted a PR to add a link to the documentation for compile flags and qualifiers. I think that's sufficient because any users sophisticated enough to care about the compile flags should be able to understand our documentation on them. I don't see why we should duplicate any of it here

isc-solon commented 3 years ago

OK. I looked again through extension settings (ObjectScript and others), and other than the one I found in my <soapbox> comment above, I see "Read more" links from the settings. I'm going to file a Documentation JIRA to see if they can create something specific for IDE compilation flags to reduce the clutter in the links suggested in earlier comments here.