Skip to content

Conversation

cnoguera
Copy link

Fixes issue 22 - #22

@Fuco1 Fuco1 requested a review from Copilot September 30, 2025 15:49
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the lsp-mssql package to use a newer version of the SQL Tools Service from GitHub releases instead of the Microsoft download server, and modernizes the codebase for compatibility with newer versions of dependencies.

  • Updates the server download URL to use GitHub releases (version 5.0.20250910.2)
  • Migrates from .NET Core 2.2 to .NET 8.0 platform targets
  • Replaces deprecated org-show-all with org-fold-show-all
  • Refactors the object explorer to use lsp-treemacs-render instead of manual buffer setup

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +115 to 118
(let* ((result (cond ((eq system-type 'darwin) "osx-arm64-net8.0.tar.gz")
((eq system-type 'gnu/linux) "linux-x64-net8.0.tar.gz")
((eq system-type 'windows-nt) "win-x64-net8.0.zip")
(t (error (format "Unsupported system: %s" system-type)))))
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded ARM64 architecture for macOS may not work on Intel-based Macs. Consider detecting the actual architecture or providing both x64 and arm64 options for macOS.

Suggested change
(let* ((result (cond ((eq system-type 'darwin) "osx-arm64-net8.0.tar.gz")
((eq system-type 'gnu/linux) "linux-x64-net8.0.tar.gz")
((eq system-type 'windows-nt) "win-x64-net8.0.zip")
(t (error (format "Unsupported system: %s" system-type)))))
(let* ((result (cond
((eq system-type 'darwin)
(if (or (string-match "arm64" system-configuration)
(string-match "aarch64" system-configuration))
"osx-arm64-net8.0.tar.gz"
"osx-x64-net8.0.tar.gz"))
((eq system-type 'gnu/linux) "linux-x64-net8.0.tar.gz")
((eq system-type 'windows-nt) "win-x64-net8.0.zip")
(t (error (format "Unsupported system: %s" system-type)))))

Copilot uses AI. Check for mistakes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a valid concern, but I have no way to verify the values of system-configuration on a mac as I don't have one or anyone who could check. The variable does exist though and on my linux system it has value "x86_64-pc-linux-gnu" so it seems legit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's pretty safe to do it this way. I have several packages that do this, and I have no issues with them.

Examples:

I'm running both packages on macOS M3.

Comment on lines +667 to +671
(lsp-treemacs-render tree title 0
"*SQL Object explorer*" nil)
(with-current-buffer "*SQL Object explorer*"
(display-buffer-in-side-window (current-buffer) '((side . right)))
(lsp-mssql-object-explorer-mode)))
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation uses tabs instead of spaces, which is inconsistent with Emacs Lisp conventions. Use consistent space-based indentation.

Copilot uses AI. Check for mistakes.

Comment on lines +673 to 682
;; - (with-current-buffer (get-buffer-create "*SQL Object explorer*")
;; - (lsp-treemacs-initialize)
;; - (setq-local lsp-treemacs-tree tree)
;; - (setq-local face-remapping-alist '((button . default)))
;; - (lsp-treemacs-generic-refresh);; -
;; - (setq-local mode-name title)




Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out code should be removed rather than left in the source. If this code might be needed for reference, consider documenting the migration in a commit message instead.

Suggested change
;; - (with-current-buffer (get-buffer-create "*SQL Object explorer*")
;; - (lsp-treemacs-initialize)
;; - (setq-local lsp-treemacs-tree tree)
;; - (setq-local face-remapping-alist '((button . default)))
;; - (lsp-treemacs-generic-refresh);; -
;; - (setq-local mode-name title)

Copilot uses AI. Check for mistakes.

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.

3 participants