GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Code reference with object type · Issue #960 · utPLSQL/utPLSQL

Code reference with object type #960

New issue
Copy link
New issue
Copy link
Closed
#964
Closed
Code reference with object type#960
#964
Copy link
Labels
enhancement

Description

@PhilippSalvisberg
PhilippSalvisberg
opened on Jul 1, 2019
Issue body actions

Is your feature request related to a problem? Please describe.

In the SQL Developer extension I create hyperlinks for code references in warnings, errors and serveroutput reported by the realtime reporter. Code references are detected by the following regular expressions:

  • \s+("(\S+?)\.(\S+?)(?:\.(\S+?))?",\s+line\s+([0-9]+))
    examples (with line as used by Oracle):

    • at "OWNER.PACKAGE.PROCEDURE", line 42
    • at "OWNER.PROCEDURE", line 42
    • at "OWNER.PACKAGE", line 42
  • ^\s{2}((\S+?)\.(\S+?)\.(\S+?))$
    example (without line, as used for commit/rollback warning, line is calculated via source lookup and parse):

    • owner.package.procedure

Via a click on the hyperlink the referenced code line is opened in the associated editor.

The problem is, that I cannot distinguish between references to aPACKAGE SPECIFICATION and a PACKAGE BODY. This information is simply missing. I do a dictionary lookup to identify the type. But if there is a SPEC and a BODY, then I go for the BODY, which is not always correct (e.g. for warnings regarding ignored annotations).

Describe the solution you'd like

I suggest to keep the existing references as is, if they are referring a PACKAGE BODY or an UNKOWN TYPE (e.g. via Oracle error stack). But for warnings which are known to be for a SPECIFICATION I suggest to extend the code reference as follows:

at package "OWNER.PACKAGE", line 42

for bodies the reference does not need to be changed, we may keep it as today:

at "OWNER.PACKAGE", line 42

Describe alternatives you've considered

There are many ways one could tag a specification, of course. However, I would change only the representation for specifications and keep the format for all other code references to minimize the impact for users working with an older version of the utPLSQL framework. This way the SQL Developer extension will still identify the hyperlink. It will open the body instead of the spec (sometimes), but that's better than no hyperlink at all or maintaining many variants of code reference formats in the SQL Developer extension.

Additional context

Here's a screenshot:

image

Activity

  1. PhilippSalvisberg commented on Jul 1, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 1, 2019
    MemberAuthor
    More actions

    I extend the existing regular expression in the SQL Developer extension to cover the optional package tag before the qualified object name (e.g. at package "OWNER.PACKAGE", line 42). This way the hyperlink will correctly point to the specification when a newer version of the utPLSQL framework is used.

    Reacted by Jacek Gębal
  2. jgebal commented on Jul 1, 2019

    @jgebal
    jgebal
    on Jul 1, 2019
    Member
    More actions

    I like the proposed solution.
    It will minimize thr impact on both consumers as well as framework itself.

    Reacted by Philipp Salvisberg
  3. PhilippSalvisberg
    added
    enhancement
    on Jul 1, 2019
  4. jgebal
    added a commit that references this issue on Jul 2, 2019

    Added `package` to annotation warnings.

    This issue will close once commit e2ff899 is merged into the 'develop' branch.
    e2ff899
  5. PhilippSalvisberg
    closed this as completedin #964on Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.