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

Notebook Mode - #Require statement appear as markdown cells #2867

Closed
EmmanuelDefranc opened this issue Aug 5, 2020 · 4 comments
Closed

Notebook Mode - #Require statement appear as markdown cells #2867

EmmanuelDefranc opened this issue Aug 5, 2020 · 4 comments
Labels
Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.

Comments

@EmmanuelDefranc
Copy link

Issue Description

When putting a #Require statement in a .ps1 file and enabling Notebook Mode, the line appears as a markdown cell.
image

Attached Logs

No logs required

Environment Information

Visual Studio Code

Name Version
Operating System Windows_NT x64 10.0.18363
VSCode 1.48.0-insider
PowerShell Extension Version 2020.7.0

PowerShell Information

Name Value
PSVersion 7.0.3
PSEdition Core
GitCommitId 7.0.3
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 6.1.0 6.2.0 7.0.3
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
azure-account ms-vscode 0.9.1
powershell-preview ms-vscode 2020.7.0
vscode-azurefunctions ms-azuretools 0.23.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label Aug 5, 2020
@TylerLeonhardt
Copy link
Member

What do you expect to happen?

It's technically a comment and the play button, just like F8, isn't smart enough to check if you can run that code block.

@EmmanuelDefranc
Copy link
Author

Hey Tyler,

I did not know that #Requires does not run on F8 (it treats it like a comment) - thanks for the info!

The idea is that the '#Requires' should be hidden from the Notebook. As of now it gets included in the markdown cell either we want it or not. I do not see the reason to show it in the Notebook, still I see the need to keep it in some ps1 files, in order to prevent from running when some predefine requisites are not met.

@SydneyhSmith SydneyhSmith added Area-Notebooks Issue-Bug A bug to squash. and removed Needs: Triage Maintainer attention needed! labels Aug 6, 2020
@SydneyhSmith
Copy link
Collaborator

While we would rather not special case not seeing the Require block as markdown, the issue that this creates space between # and Require warrants fixing, and likely the easiest way to do that is through a special casing

@andyleejordan
Copy link
Member

We've removed the experimental notebook support in #3176, going to mark this resolved.

@andyleejordan andyleejordan added the Resolution-Fixed Will close automatically. label Apr 13, 2021
@ghost ghost closed this as completed Apr 14, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants