Skip to content

serverForUri should either set ns or be undefined - #1843

Merged
isc-klu merged 14 commits into
intersystems-community:masterfrom
isc-klu:serverForUri-should-initialize-ns
Aug 25, 2026
Merged

serverForUri should either set ns or be undefined#1843
isc-klu merged 14 commits into
intersystems-community:masterfrom
isc-klu:serverForUri-should-initialize-ns

Conversation

@isc-klu

@isc-klu isc-klu commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

While working on language-server#414, I found that serverForUri can return a ServerForUri with namespace (typed as required string) actually undefined at runtime.

Root cause: AtelierAPI.setConnection computes ns as undefined when neither an explicit namespace nor objectscript.conn.ns is set. That flows through _config/config() and gets asserted non-null where serverForUri destructures it.

Fix: return undefined from serverForUri instead of lying with !.

I am not sure if we want to instead default the namespace to USER.

@isc-klu
isc-klu requested a review from gjsjohnmurray August 25, 2026 20:08
@isc-klu
isc-klu marked this pull request as ready for review August 25, 2026 21:25
@isc-klu
isc-klu requested a review from isc-bsaviano as a code owner August 25, 2026 21:25
@isc-klu
isc-klu merged commit 0bd0a7d into intersystems-community:master Aug 25, 2026
5 checks passed
@isc-klu
isc-klu deleted the serverForUri-should-initialize-ns branch August 25, 2026 22:36
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

Successfully merging this pull request may close these issues.

2 participants