Skip to content

chore: Replace _impl alias with explicit wrapper in R/coloring.R#2364

Merged
krlmlr merged 4 commits intomainfrom
copilot/replace-impl-aliases-coloring
Oct 25, 2025
Merged

chore: Replace _impl alias with explicit wrapper in R/coloring.R#2364
krlmlr merged 4 commits intomainfrom
copilot/replace-impl-aliases-coloring

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 25, 2025

Replaces direct function aliasing with an explicit wrapper that forwards arguments individually.

Changes:

  • Converts greedy_vertex_coloring <- vertex_coloring_greedy_impl to an explicit wrapper function
  • Uses arg = arg notation for argument forwarding
  • Preserves function signature and default values

Before:

greedy_vertex_coloring <- vertex_coloring_greedy_impl

After:

greedy_vertex_coloring <- function(graph, heuristic = c("colored_neighbors", "dsatur")) {
  vertex_coloring_greedy_impl(
    graph = graph,
    heuristic = heuristic
  )
}

This makes the public API interface explicit and improves code maintainability without changing behavior.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cloud.r-project.org
    • Triggering command: /usr/lib/R/bin/exec/R --no-echo --no-restore -e install.packages(&#39;pak&#39;,~&#43;~repos~&#43;~=~&#43;~&#39;REDACTED&#39;,~&#43;~lib=&#39;~/R/library&#39;) (dns block)
  • cran.rstudio.com
    • Triggering command: /usr/lib/R/bin/exec/R --no-echo --no-restore -e .libPaths(&#39;~/R/library&#39;);~&#43;~install.packages(&#39;testthat&#39;,~&#43;~repos~&#43;~=~&#43;~&#39;REDACTED&#39;,~&#43;~lib=&#39;~/R/library&#39;) (dns block)
  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Replace _impl aliases in R/coloring.R</issue_title>
<issue_description>Goal
Review the code in R/coloring.R and replace all direct _impl function aliases with explicit wrapper functions.

Functions to update:

  • greedy_vertex_coloring <- vertex_coloring_greedy_impl

Instructions

  1. Review the code to understand the function signatures
  2. Create explicit wrapper functions that forward to the _impl functions
  3. Forward each argument individually and explicitly using arg = arg notation
  4. Do not use ... unless the _impl function itself uses ...

Pattern
Replace direct aliasing like:

func_name <- func_name_impl

With an explicit wrapper:

func_name <- function(arg1, arg2, ...) {
  func_name_impl(
    arg1 = arg1,
    arg2 = arg2,
    ...
  )
}

File
R/coloring.R</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace _impl aliases with explicit wrapper functions Replace _impl alias with explicit wrapper in R/coloring.R Oct 25, 2025
Copilot AI requested a review from krlmlr October 25, 2025 15:42
@krlmlr krlmlr changed the title Replace _impl alias with explicit wrapper in R/coloring.R chore: Replace _impl alias with explicit wrapper in R/coloring.R Oct 25, 2025
@krlmlr krlmlr marked this pull request as ready for review October 25, 2025 16:24
@krlmlr krlmlr merged commit 78a1ae1 into main Oct 25, 2025
1 check passed
@krlmlr krlmlr deleted the copilot/replace-impl-aliases-coloring branch October 25, 2025 17:33
krlmlr added a commit that referenced this pull request Oct 25, 2025
…2364)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Co-authored-by: Kirill Müller <krlmlr@users.noreply.github.com>
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.

Replace _impl aliases in R/coloring.R

2 participants