Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove R Package Scan action #2404

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Remove R Package Scan action #2404

merged 1 commit into from
Oct 18, 2024

Conversation

sagerb
Copy link
Collaborator

@sagerb sagerb commented Oct 18, 2024

Intent

Resolves #2403

Type of Change

    • Bug Fix
    • New Feature
    • Breaking Change
    • Documentation
    • Refactor
    • Tooling

Approach

Removed ability to scan from HomeView. This eliminates the original error shown, which was exposed from invalid renv environment.

Consolidated some errors to show consistently, and then replaced scan button with anchor link to renv documentation.

Updated documentation.

Directions for Reviewers

Verify:

  • verify that the scan button is gone from the R Package view
  • verify normal publish functionality with a renv.lock file in place (and active renv environment)
  • verify R Package view shows welcome view with new anchor w/ reference to renv doc, when package file is not present (missing or empty). Name of package file should match what is in config. Anchor should open renv documentation.
  • verify publishing fails w/ proper error when missing, empty or invalid package file

Checklist

@sagerb sagerb self-assigned this Oct 18, 2024
@sagerb sagerb modified the milestone: v1.2.0 Oct 18, 2024
@@ -60,7 +60,6 @@ const pythonPackagesCommands = {
const rPackagesCommands = {
Edit: "posit.publisher.rPackages.edit",
Refresh: "posit.publisher.rPackages.refresh",
Scan: "posit.publisher.rPackages.scan",
} as const;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This removes the "eye" icon from the R Packages view expanded toolbar.

"title": "Scan for R Packages",
"icon": "$(eye)",
"category": "Posit Publisher"
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This removes the high-level internal command from the extension.

Commands.RPackages.Scan,
this.onScanForRPackageRequirements,
this,
),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no longer register a handler for the scan command that we removed.

<vscode-button @click="onScanForPackageRequirements()">
Scan
</vscode-button>
</template>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was basically the same as above, so it's been consolidated.

uriPath: "https://rstudio.github.io/renv/articles/renv.html",
},
});
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This new code is invoked when the user clicks on the anchor we added.

Copy link
Collaborator

@kgartland-rstudio kgartland-rstudio left a comment

Choose a reason for hiding this comment

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

  • Mismatched package versions in renv.lock and library
  • R Section shows proper warning when missing renv.lock
  • R Section shows proper warning when missing renv/activate.R
  • R Section respects Package file listed and uses the proper filename in new warn text
  • renv link works

@sagerb sagerb merged commit 332099b into main Oct 18, 2024
14 checks passed
@sagerb sagerb deleted the sagerb-remove-r-package-scan branch October 18, 2024 20:01
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.

Clicking the Scan button in R Packages when no renv/activate.R file exists an uninformative error is thrown
2 participants