Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

Implements first step of package modularization by extracting core infrastructure into standalone constructive.core package in sub/ directory.

Package Structure

Created sub/constructive.core/ containing:

  • Core infrastructure (34 files): construct(), construct_multi(), construct_diff(), helper utilities, options system, attribute repair, deparse functions
  • Base type methods (18 files): Constructors for NULL, atomic vectors, list, array, matrix, environment, function, language objects, pairlist, dots, externalptr, S4/object types
  • C++ code: External pointer and environment handling (updated for constructive.core namespace)
  • Tests: 26 test files with snapshots covering core functionality
  • Metadata: DESCRIPTION, LICENSE, README, .Rbuildignore

Implementation Notes

  • Package is self-contained and buildable independently
  • Main constructive package unchanged (code duplication maintained for now)
  • Updated .Rbuildignore to exclude sub/ from main package builds
  • Dependencies: cli, diffobj, methods, rlang, waldo

Next Steps

Future PRs will:

  1. Make main package depend on constructive.core
  2. Remove duplicated code from main package
  3. Extract additional packages (constructive.base, constructive.ggplot2, etc.)

Addresses #638, supports #581 roadmap.

Original prompt

This section details on the original issue you should resolve

<issue_title>Extract constructive.core package</issue_title>
<issue_description>See parent issue. The package should live in the sub directory in the root of this repository. </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.

Copilot AI changed the title [WIP] Extract constructive.core package to sub directory Extract constructive.core package to sub/ directory Oct 30, 2025
Copilot AI requested a review from krlmlr October 30, 2025 11:36
Copilot finished work on behalf of krlmlr October 30, 2025 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Extract constructive.core package

2 participants