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

NETSCRIPT: Add .script deprecation notice & migration guide #1007

Merged
merged 20 commits into from
Jan 7, 2024

Conversation

LJNeon
Copy link
Contributor

@LJNeon LJNeon commented Jan 1, 2024

I don't feel the need to justify or explain this change as it has already been agreed to unanimously on Discord.

I can't test this PR, both the migration guide and the terminal warning need to be tested before merge.

@LJNeon
Copy link
Contributor Author

LJNeon commented Jan 1, 2024

Also I am unable to run prettier, hopefully that can be done via maintainer edits which should be enabled.

Copy link
Collaborator

@Snarling Snarling left a comment

Choose a reason for hiding this comment

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

The terms "ns1" and "ns2" are not really accurate and should not be used. .script are a legacy script format that is no longer supported, and .js are javascript files.

The original game documentation pretended that "Netscript" was the language used by game scripts. It's not it's own language, and it's helpful for players if they know the scripts they are writing are literally javascript. .script files were an interpreted version of javascript based on es5, whereas .js files are actual javascript modules running natively within the player's browser. We intentionally removed references to "ns1" and "ns2" a long time ago.

Netscript is still the name of the game's API, which is passed in as the first argument for player script main functions with the default parameter name ns. But there is no "ns1" or "ns2", as both script formats can access the same API (although some parts of it don't work in .script files)

@LJNeon
Copy link
Contributor Author

LJNeon commented Jan 2, 2024

So you want to go by just file extensions instead? Or do you want that specific "legacy script format" and "javascript files" distinction?

@Alpheus
Copy link
Contributor

Alpheus commented Jan 2, 2024

So you want to go by just file extensions instead? Or do you want that specific "legacy script format" and "javascript files" distinction?

It seems the distinction is in the "execution format" being deprecated, not anything Netscript-related. Netscript is the API and it stays. In that context the message applies to: "deprecating the ability to run '.script' files to access the Netscript API".

@LJNeon
Copy link
Contributor Author

LJNeon commented Jan 2, 2024

@Snarling is that wording better?

@Snarling
Copy link
Collaborator

Snarling commented Jan 6, 2024

@LJNeon I made some additional changes and added some more content, mind looking this over before I merge it? Sorry for the delay in following up on this.

@LJNeon
Copy link
Contributor Author

LJNeon commented Jan 6, 2024

Looks good to me!

@Snarling Snarling merged commit a433c82 into bitburner-official:dev Jan 7, 2024
5 checks passed
G4mingJon4s pushed a commit to G4mingJon4s/bitburner-src that referenced this pull request Mar 23, 2024
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.

5 participants