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

Rework on build tasks #298

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Rework on build tasks #298

merged 1 commit into from
Jun 19, 2024

Conversation

josesimoes
Copy link
Member

@josesimoes josesimoes commented Jun 19, 2024

Description

  • Remove dependency of local nanoFirmawareFlasher.
  • Replace with calls to nanoff dotnet tool.
  • Add installer step to extension activation.
  • Fix all calls to nanoff.
  • General improvements in all Dotnet class API: calling msbuild, generating outputs, calling nanoff to deploy and flash.
  • Update repo readme and developer instructions.
  • Update AZDO yaml to remove the build tasks and everything related with nanoff local copy.

Motivation and Context

How Has This Been Tested?

  • Locally running extension.

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

Summary by CodeRabbit

  • Chores
    • Removed obsolete build steps related to nanoff in the Azure Pipelines configuration, streamlining the build process.

@nfbot nfbot added Type: bug Something isn't working Type: enhancement New feature or request Area: Config-and-Build Type: dependencies Type: Documentation Improvements or additions to documentation labels Jun 19, 2024
Copy link

coderabbitai bot commented Jun 19, 2024

Walkthrough

The changes remove the build steps related to the nanoff tool from the Azure Pipelines configuration. This involves eliminating the DotNetCoreCLI task that was previously used for building nanoff, as well as the associated script that added executable rights to the utils folder where nanoff was stored.

Changes

File Change Summary
azure-pipelines.yml Removed the DotNetCoreCLI task for building nanoff and the subsequent script that added executable rights to the utils folder.

Sequence Diagram(s)

(No sequence diagrams are necessary for these changes as they are purely configuration-related.)

Assessment against linked issues

Objective Addressed Explanation
1. .NET nanoFramework Extension for VS Code v1.0.130^ missing nanoff.dll (#1181) The changes address the removal of nanoff build steps but do not resolve the issue of the missing nanoff.dll in the extension.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

src/dotnet.ts Dismissed Show dismissed Hide dismissed
src/dotnet.ts Dismissed Show dismissed Hide dismissed
src/dotnet.ts Dismissed Show dismissed Hide dismissed
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (6)
azure-pipelines.yml (6)

Line range hint 24-25: Remove trailing spaces to adhere to YAML best practices.

-  branches:
-    include:
+  branches:
+    include:

Line range hint 72-72: Remove trailing spaces to maintain YAML file cleanliness.

-  - script: npm ci
+  - script: npm ci

Line range hint 82-82: Remove trailing spaces to ensure YAML syntax accuracy.

-  - script: npm run build:prod
+  - script: npm run build:prod

Line range hint 94-94: Remove trailing spaces to avoid potential YAML parsing issues.

-  - pwsh: |
+  - pwsh: |

Line range hint 115-115: Remove trailing spaces to enhance the readability and maintainability of the YAML file.

-  - template: azure-pipelines-templates/discord-webhook-task.yml@templates  
+  - template: azure-pipelines-templates/discord-webhook-task.yml@templates

Line range hint 140-140: Remove trailing spaces on these lines to align with best practices for YAML files.

-  - task: CopyFiles@2
+  - task: CopyFiles@2

-  - task: PublishBuildArtifacts@1
+  - task: PublishBuildArtifacts@1

Also applies to: 180-180

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2acf752 and 60f2b93.

Files ignored due to path filters (7)
  • .gitmodules is excluded by none and included by none
  • README.md is excluded by !**/*.md and included by none
  • installation.md is excluded by !**/*.md and included by none
  • nanoFirmwareFlasher is excluded by none and included by none
  • scripts/build.ps1 is excluded by none and included by none
  • src/dotnet.ts is excluded by none and included by none
  • src/extension.ts is excluded by none and included by none
Files selected for processing (1)
  • azure-pipelines.yml (1 hunks)
Additional context used
yamllint
azure-pipelines.yml

[error] 24-24: trailing spaces (trailing-spaces)


[error] 25-25: trailing spaces (trailing-spaces)


[error] 72-72: trailing spaces (trailing-spaces)


[error] 82-82: trailing spaces (trailing-spaces)


[error] 94-94: trailing spaces (trailing-spaces)


[error] 115-115: trailing spaces (trailing-spaces)


[error] 140-140: trailing spaces (trailing-spaces)


[error] 180-180: trailing spaces (trailing-spaces)

- Remove dependency of local nanoFirmawareFlasher.
- Replace with calls to nanoff dotnet tool.
- Add installer step to extension activation.
- Fix all calls to nanoff.
- General improvements in all Dotnet class API: calling msbuild, generating outputs, calling nanoff to deploy and flash.
- Update repo readme and developer instructions.
- Update AZDO yaml to remove the build tasks and everything related with nanoff local copy.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (2)
azure-pipelines.yml (2)

Line range hint 24-24: Clean up trailing spaces to maintain code quality and consistency.

- # PR always trigger build  
+ # PR always trigger build

- # add nf-tools repo to resources (for Azure Pipelines templates)  
+ # add nf-tools repo to resources (for Azure Pipelines templates)

-  - pwsh: scripts/build.ps1  
+  - pwsh: scripts/build.ps1

-  - task: DeleteFiles@1  
+  - task: DeleteFiles@1

-  - script: npm ci  
+  - script: npm ci

-  - task: DotNetCoreCLI@2  
+  - task: DotNetCoreCLI@2

-  - pwsh: |  
+  - pwsh: |

-  - task: CopyFiles@2  
+  - task: CopyFiles@2

Also applies to: 25-25, 72-72, 82-82, 94-94, 115-115, 140-140, 180-180


Line range hint 72-72: Consider removing the condition: succeeded() from the DeleteFiles task if it's essential that this step always runs regardless of previous failures.

- condition: succeeded()
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 60f2b93 and 0403465.

Files ignored due to path filters (8)
  • .gitmodules is excluded by none and included by none
  • README.md is excluded by !**/*.md and included by none
  • installation.md is excluded by !**/*.md and included by none
  • nanoFirmwareFlasher is excluded by none and included by none
  • scripts/build.ps1 is excluded by none and included by none
  • src/dotnet.ts is excluded by none and included by none
  • src/extension.ts is excluded by none and included by none
  • src/multiStepInput.ts is excluded by none and included by none
Files selected for processing (1)
  • azure-pipelines.yml (1 hunks)
Additional context used
yamllint
azure-pipelines.yml

[error] 24-24: trailing spaces (trailing-spaces)


[error] 25-25: trailing spaces (trailing-spaces)


[error] 72-72: trailing spaces (trailing-spaces)


[error] 82-82: trailing spaces (trailing-spaces)


[error] 94-94: trailing spaces (trailing-spaces)


[error] 115-115: trailing spaces (trailing-spaces)


[error] 140-140: trailing spaces (trailing-spaces)


[error] 180-180: trailing spaces (trailing-spaces)

Additional comments not posted (3)
azure-pipelines.yml (3)

Line range hint 180-180: Ensure the PublishBuildArtifacts@1 task is correctly configured to publish the intended artifacts.

Verification successful

The PublishBuildArtifacts@1 task is configured to publish artifacts from the $(Build.ArtifactStagingDirectory) directory, which is the intended directory for build artifacts. This confirms that the task is correctly set up to publish the intended artifacts.

  • PublishBuildArtifacts@1 task configuration:
    • ArtifactName: git-mob-vs-code
    • PathtoPublish: $(Build.ArtifactStagingDirectory)
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all intended artifacts are being published.

# Test: List all files in the artifact staging directory.
ls -l $(Build.ArtifactStagingDirectory)

Length of output: 1085



Script:

#!/bin/bash
# Search for the PublishBuildArtifacts@1 task in the azure-pipelines.yml file
rg 'PublishBuildArtifacts@1' azure-pipelines.yml

Length of output: 82



Script:

#!/bin/bash
# Retrieve the configuration details of the PublishBuildArtifacts@1 task in the azure-pipelines.yml file
rg -A 5 -B 5 'PublishBuildArtifacts@1' azure-pipelines.yml

Length of output: 432


Line range hint 14-14: Ensure the trigger configuration for branches is adequate for the project's workflow.


Line range hint 94-94: The npm ci task is marked as always succeeding. Ensure this is intentional, as it may mask failures in dependency installation.

Verification successful

The npm ci task is configured with the condition succeeded(), which means it will only run if previous tasks have succeeded. There is no indication that it is set to always succeed (continueOnError is not present).

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that `npm ci` is configured to fail on errors.

# Test: Force a failure in `npm ci` and observe if it fails the build.
npm ci --force-fail

Length of output: 92



Script:

#!/bin/bash
# Description: Locate the `npm ci` task in the `azure-pipelines.yml` file and check its configuration.

# Locate the `npm ci` task
rg 'npm ci' azure-pipelines.yml

# Check if the task is configured to always succeed
rg 'npm ci' -A 5 azure-pipelines.yml | grep 'continueOnError'

Length of output: 138



Script:

#!/bin/bash
# Description: Thoroughly check the configuration of the `npm ci` task in the `azure-pipelines.yml` file.

# Check the surrounding lines of the `npm ci` task for any configurations that might cause it to always succeed
rg -A 10 -B 10 'npm ci' azure-pipelines.yml

Length of output: 573

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Config-and-Build Type: bug Something isn't working Type: dependencies Type: Documentation Improvements or additions to documentation Type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET nanoFramework Extension for VS Code v1.0.130^ missing nanoff.dll
2 participants