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

What's new: 2024-07-July #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
320 changes: 320 additions & 0 deletions src/pages/whats-new/2024-07-July.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,320 @@
---
date: July 2024
summary: Changes to vscode-brightscript-language, brighterscript, roku-deploy, roku-debug, bslint
layout: ../../layouts/WhatsNewPost.astro
---
# Overview
Welcome to the July 2024 edition of "What's New in RokuCommunity." Please consider <a target="_blank" href="https://rokucommunity.substack.com/">subscribing</a> to stay up to date with what's happening in RokuCommunity.

## We need your help
The RokuCommunity projects are maintained by a relatively small group of developers (mostly volunteers), and we have a growing list of unresolved issues. We need your help! There are many different ways you can contribute. Whether it's addressing bugs, improving documentation, introducing new features, or simply helping us manage our expanding list of GitHub issues, your involvement would be greatly appreciated. We are more than happy to guide you in finding the most suitable contribution method that aligns with your interests. To learn more about how you can contribute, feel free to reach out to us on [Slack](https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA), or explore the existing GitHub issues:

- [vscode-brightscript-language](https://github.com/rokucommunity/vscode-brightscript-language/issues)
- [brighterscript](https://github.com/rokucommunity/brighterscript/issues)
- [brighterscript-formatter](https://github.com/rokucommunity/brighterscript-formatter/issues)
- [roku-deploy](https://github.com/rokucommunity/roku-deploy/issues)
- [roku-debug](https://github.com/rokucommunity/roku-debug/issues)
- [bslint](https://github.com/rokucommunity/bslint/issues)
- [ropm](https://github.com/rokucommunity/ropm/issues)
- [brs](https://github.com/rokucommunity/brs/issues)
- [roku-report-analyzer](https://github.com/rokucommunity/roku-report-analyzer/issues)
- [@rokucommunity/promises](https://github.com/rokucommunity/promises/issues)
- [roku-http](https://github.com/rokucommunity/roku-http)

## Issue of the month

In this section, we highlight a specific issue where we could benefit from the community's assistance in finding a solution. These problems are generally straightforward to address, and serve as an excellent opportunity to become acquainted with the various RokuCommunity codebases.

This month, we'd like to highlight [SOME_GH_ISSUE](SOME_URL). SOME_DESCRIPTION


If you're interested in working on this feature, please comment on the [github issue](SOME_LINK) or reach out to us on [Slack](https://join.slack.com/t/rokudevelopers/shared_invite/zt-4vw7rg6v-NH46oY7hTktpRIBM_zGvwA)
# Editor
## Add support for removing nodes in SceneGraph Inspector
<!-- 2024-06-12 (for v2.48.6 released on 2024-07-24), https://github.com/RokuCommunity/vscode-brightscript-language/pull/578 -->

![Jun-12-2024 15-56-21](https://github.com/rokucommunity/vscode-brightscript-language/assets/1753881/89b350af-8eba-4546-89c8-f767281cf13d)



## Add support for viewing nodes that are in the node tree from NodeCountByTypePage
<!-- 2024-07-02 (for v2.48.6 released on 2024-07-24), https://github.com/RokuCommunity/vscode-brightscript-language/pull/579 -->

As you can see in the preview not all nodes are not available to view. This is because those nodes are not currently stored. This could potentially be added in the future but would be a good deal of work to support.
![Jun-18-2024 16-58-28](https://github.com/rokucommunity/vscode-brightscript-language/assets/1753881/524a6b29-20db-4445-a983-230b7b75a6fe)




# Debugging

## Prevent crash when rokuAdapter is not defined.
<!-- 2024-07-08 (for v0.21.10 released on 2024-07-24), https://github.com/RokuCommunity/roku-debug/pull/194 -->

Prevent `Cannot read properties of undefined (reading 'isAtDebuggerPrompt')` crash when rokuAdapter is undefined. I believe this happens during the teardown anyway, but it's still better to avoid the crash entirely.



# BrighterScript

## Convenience export Location
<!-- 2024-06-17 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/brighterscript/pull/1236 -->

Export `Location` so it can be used directly in plugins
Also, ran `npm audit fix`


## Update Digitial Picture Frame url and img
<!-- 2024-06-19 (for v0.67.4 released on 2024-07-24), https://github.com/RokuCommunity/brighterscript/pull/1237 -->




## Fixes completions when file in multiple scopes
<!-- 2024-06-25 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/brighterscript/pull/1238 -->

There was a bug that if a file was in multiple scopes, global completions and completions for the same file were only included once, that is not for every scope. However, there's also a process that filters out completions that don't work for every scope.

This is not the most performant code, because it has to link every scope, as well as do symbol tables checks for every scope, but it works.

![image](https://github.com/rokucommunity/brighterscript/assets/810290/eb781047-7da6-43a2-b58e-e8153243e6da)


Addresses: #1235


## Removes `Parser.statements`
<!-- 2024-06-25 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/brighterscript/pull/1239 -->

Most all changes here are in tests.

Addresses #1230


## Sets a hard limit of number of scopes to check for completions
<!-- 2024-07-08 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/brighterscript/pull/1244 -->

Sets a hard limit (of 5) of the number of scopes to check for a file when processing completions.

In Jellyfin, completion processing went from ~500ms to ~9ms

Fixes #1240

Based off code found in this commit: https://github.com/rokucommunity/brighterscript/commit/bac0ae90bcc00df2689371e451983c33478c4695


## Fixes ifSystemLog and ifArraySlice docs
<!-- 2024-07-15 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/brighterscript/pull/1250 -->

Addresses #1249

I also found an issue with `ifArraySlice` that is fixed here.

The problem with ifArraySlice is that the docs were not parsed correctly -- instead of messing with the parsing, I just added it an an override.

This is how it looks on the Roku docs site - I think the double square brackets are the issue:

<img width="760" alt="image" src="https://github.com/user-attachments/assets/9b7ee432-fa37-4032-8b08-cf10759888fe">



## Ensure methods leading comments are transpiled above instance function definition
<!-- 2024-07-24 (for v1.0.0-alpha.35 released on 2024-07-31), https://github.com/RokuCommunity/brighterscript/pull/1257 -->

Due to the change to remove `CommentStatement`, leading trivia transpilation is done automatically for each statement.
Since we need to rely on function transpilation, a new state flag was added to remove transpiling function leading comments.
those comments are now added *before* the function is added to the instance



Fixes #1256

Thanks for the find, @iBicha



## Allow variables and parameters to shadow namespaces
<!-- 2024-07-25 (for v1.0.0-alpha.35 released on 2024-07-31), https://github.com/RokuCommunity/brighterscript/pull/1263 -->

Addresses #1255

![image](https://github.com/user-attachments/assets/0b80707f-4445-4309-a2a9-c9474ff17827)



## Remove `file` prop from `BsDiagnostic`
<!-- 2024-07-25 (for v1.0.0-alpha.35 released on 2024-07-31), https://github.com/RokuCommunity/brighterscript/pull/1248 -->

All diagnostics internal to Brighterscript now use a `location: Location` prop instead of `file: BscFile`

This has a few good points:
- Diagnostics no longer have a reference to a file, so no circular references to remove
- Aligns better with the change to use `Location` for Tokens and AstNodes

One thing to note is that sometimes we need to back-convert a URI to a path for finding the files that a diagnostic applies to.
There might be some inconsistencies between Operating Systems (Mac vs. Windows, etc) that *should* be dealt with the `URI` namespace from `vscode-uri`, but I'm not entirely sure.


Addresses: #1155



## Add templatestring support for annotation.getArguments()
<!-- 2024-07-25 (for v1.0.0-alpha.35 released on 2024-07-31), https://github.com/RokuCommunity/brighterscript/pull/1264 -->

Adds support for simple templatestrings as arguments for annotations when calling .getArguments()


## Ensures conditional compilation blocks have proper validation segments
<!-- 2024-07-26 (for v1.0.0-alpha.35 released on 2024-07-31), https://github.com/RokuCommunity/brighterscript/pull/1267 -->

Fixes #1265

Conditional compilation blocks (like namespaces) have no symbols in and of themselves that require validation, so they are skipped.




## Make absolute import completions use original extension
<!-- 2024-07-31 (for v1.0.0-alpha.35 released on 2024-07-31), https://github.com/RokuCommunity/brighterscript/pull/1266 -->

If the original file ends in `.bs` , use that instead of `.brs` in absolute imports

![image](https://github.com/user-attachments/assets/1c871e24-c1bc-4ddf-b8bc-805cc7be4a12)


addresses: #1258



# Community Tools

## bslint
## Fix safe colors
<!-- 2024-03-11 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/bslint/pull/101 -->

Fix safe colors, white is now `#EBEBEB`


## Fix npm audit issues
<!-- 2024-03-19 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/bslint/pull/98 -->

- Fix some npm audit issues
- migrate to `coveralls-next`


## fix node14
<!-- 2024-05-03 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/bslint/pull/106 -->




## Fixing issues before release 0.8.21
<!-- 2024-05-17 (for v1.0.0-alpha.34 released on 2024-07-24), ([0ed0693](https://github.com/RokuCommunity/bslint/commit/0ed0693)) -->




## Checks Conditional Compile blocks for returns
<!-- 2024-07-02 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/bslint/pull/114 -->

Addresses #113




## add rule for inefficient interface types
<!-- 2024-07-24 (for v1.0.0-alpha.34 released on 2024-07-24), https://github.com/RokuCommunity/bslint/pull/115 -->

Demo:
![image](https://github.com/user-attachments/assets/8c5f06e7-e27f-4f33-88b6-efc6274aefc1)



## roku-deploy
## fix-node14
<!-- 2024-05-03 (for v3.12.1 released on 2024-07-19), https://github.com/RokuCommunity/roku-deploy/pull/165 -->




## Fix bug with absolute paths and getDestPath
<!-- 2024-07-19 (for v3.12.1 released on 2024-07-19), https://github.com/RokuCommunity/roku-deploy/pull/171 -->

Fixes an issue with `getDestPath` where it wouldn't work with certain absolute paths for the files array `src` prop



# Community Libraries


# Formatting


# Preview features
<!-- any alpha/beta changes across all projects should be documented here and not in their primary area above-->

# Documentation

# Misc

# For Contributors

***

# TODO
***Move these items to an appropriate section above, then delete this section***

***

# Thank you

Last but certainly not least, a big **_Thank You_** to the following people who contributed this month:

Contributions to [vscode-brightscript-language](https://github.com/RokuCommunity/vscode-brightscript-language):

- [@triwav (Brian Leighty)](https://github.com/triwav)
- Add support for removing nodes in SceneGraph Inspector ([PR #578](https://github.com/RokuCommunity/vscode-brightscript-language/pull/578))
- Add support for viewing nodes that are in the node tree from NodeCountByTypePage ([PR #579](https://github.com/RokuCommunity/vscode-brightscript-language/pull/579))

Contributions to [brighterscript](https://github.com/RokuCommunity/brighterscript):

- [@Christian-Holbrook (Christian-Holbrook)](https://github.com/Christian-Holbrook)
- Update Digitial Picture Frame url and img ([PR #1237](https://github.com/RokuCommunity/brighterscript/pull/1237))
- [@markwpearce (Mark Pearce)](https://github.com/markwpearce)
- Convenience export Location ([PR #1236](https://github.com/RokuCommunity/brighterscript/pull/1236))
- Fixes completions when file in multiple scopes ([PR #1238](https://github.com/RokuCommunity/brighterscript/pull/1238))
- Removes `Parser.statements` ([PR #1239](https://github.com/RokuCommunity/brighterscript/pull/1239))
- Sets a hard limit of number of scopes to check for completions ([PR #1244](https://github.com/RokuCommunity/brighterscript/pull/1244))
- Fixes ifSystemLog and ifArraySlice docs ([PR #1250](https://github.com/RokuCommunity/brighterscript/pull/1250))
- Ensure methods leading comments are transpiled above instance function definition ([PR #1257](https://github.com/RokuCommunity/brighterscript/pull/1257))
- Allow variables and parameters to shadow namespaces ([PR #1263](https://github.com/RokuCommunity/brighterscript/pull/1263))
- Remove `file` prop from `BsDiagnostic` ([PR #1248](https://github.com/RokuCommunity/brighterscript/pull/1248))
- Ensures conditional compilation blocks have proper validation segments ([PR #1267](https://github.com/RokuCommunity/brighterscript/pull/1267))
- Make absolute import completions use original extension ([PR #1266](https://github.com/RokuCommunity/brighterscript/pull/1266))
- [@TwitchBronBron (Bronley Plumb)](https://github.com/TwitchBronBron)
- Add templatestring support for annotation.getArguments() ([PR #1264](https://github.com/RokuCommunity/brighterscript/pull/1264))

Contributions to [roku-deploy](https://github.com/RokuCommunity/roku-deploy):

- [@TwitchBronBron (Bronley Plumb)](https://github.com/TwitchBronBron)
- fix-node14 ([PR #165](https://github.com/RokuCommunity/roku-deploy/pull/165))
- Fix bug with absolute paths and getDestPath ([PR #171](https://github.com/RokuCommunity/roku-deploy/pull/171))

Contributions to [roku-debug](https://github.com/RokuCommunity/roku-debug):

- [@TwitchBronBron (Bronley Plumb)](https://github.com/TwitchBronBron)
- Prevent crash when rokuAdapter is not defined. ([PR #194](https://github.com/RokuCommunity/roku-debug/pull/194))

Contributions to [bslint](https://github.com/RokuCommunity/bslint):

- [@iBicha (Brahim Hadriche)](https://github.com/iBicha)
- Fix safe colors ([PR #101](https://github.com/RokuCommunity/bslint/pull/101))
- [@markwpearce (Mark Pearce)](https://github.com/markwpearce)
- Checks Conditional Compile blocks for returns ([PR #114](https://github.com/RokuCommunity/bslint/pull/114))
- [@RokuAndrii (RokuAndrii)](https://github.com/RokuAndrii)
- add rule for inefficient interface types ([PR #115](https://github.com/RokuCommunity/bslint/pull/115))
- [@TwitchBronBron (Bronley Plumb)](https://github.com/TwitchBronBron)
- Fix npm audit issues ([PR #98](https://github.com/RokuCommunity/bslint/pull/98))
- fix node14 ([PR #106](https://github.com/RokuCommunity/bslint/pull/106))
- Fixing issues before release 0.8.21 ([0ed0693](https://github.com/RokuCommunity/bslint/commit/0ed0693))