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

Warn about corruption in Dependencies.toml. #42717

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Thevakumar-Luheerathan
Copy link
Member

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #42106

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

new CommandLine(buildCommand);
buildCommand.execute();
String buildLog = readOutput(true);
Assert.assertTrue(buildLog.contains("WARNING [Dependencies.toml:(6:1,18:1)] " +
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we check for an exact match here with the expected log written in a file? AFAIR we did this for most of the existing tests.

if (parsedDependecyManifest.diagnostics().hasErrors()) {
var diagnosticInfo = new DiagnosticInfo(
ProjectDiagnosticErrorCode.CORRUPTED_DEPENDENCIES_TOML.diagnosticId(),
"Detected corrupted 'Dependencies.toml' file. This will be updated to latest dependencies.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"Detected corrupted 'Dependencies.toml' file. This will be updated to latest dependencies.",
"Detected corrupted 'Dependencies.toml' file. This will be updated to the latest dependencies.",

also IMO, it's better to say something like,
Detected corrupted 'Dependencies.toml' file. Dependencies will be updated to the latest versions ignoring the 'Dependencies.toml'.

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.

[Bug]: Building a project with a corrupted Dependencies.toml causes a bad sad error for some cases
2 participants