p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

phantom files after renaming or deleting

Open SomeStein opened this issue 1 year ago • 7 comments

p5.js version

v1.11.1 October 31, 2024

What is your operating system?

Mac OS

Web browser and version

chrome 131.0.6778.205

Actual Behavior

i have implemented a minimal version of a WebWorker. Only a postMessage from main and one back from worker.js. after editing the existing worker.js file the message send back was the same even tho it was saved. When completely renaming the file to worker2.js (and changing it in the main and index file) it worked like expected but i even could still read the data of worker.js even after deletion by changing the references back to worker.js.

Expected Behavior

clear

Steps to reproduce

sketch.js:

let testfileText = "";

function preload() {
  // Load the contents of worker.js as text
  testfileText = loadStrings('testfile.js');
}

function setup() {
  console.log(testfileText.join("\n"));
}

testfile.js :

//testfile

index.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/addons/p5.sound.min.js"></script>
    <link rel="stylesheet" type="text/css" href="style.css">
    <meta charset="utf-8" />

  </head>
  <body>
    <main>
    </main>
    <script src="testfile.js"></script>
    <script src="sketch.js"></script>
  </body>
</html>

Saving Everything in editor changing testfile to:

//testfile new

after saving it still logs "//testfile" instead of "//testfile new" in console

I already tried: resaving everything refreshing website using absolute paths deleting file deleting chrome cache

SomeStein avatar Jan 08 '25 03:01 SomeStein

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

welcome[bot] avatar Jan 08 '25 03:01 welcome[bot]

assign to me i will fix it

huntermarchi avatar Jan 11 '25 11:01 huntermarchi

@huntermarchi do we need to wait until they assign any issue to use to work on it ?? cant we just solve issues and create pr.. i didn't saw anything in guidelines can you please clear this doubt.

Pratikkale26 avatar Jan 11 '25 17:01 Pratikkale26

@huntermarchi do we need to wait until they assign any issue to use to work on it ?? cant we just solve issues and create pr.. i didn't saw anything in guidelines can you please clear this doubt.

we can directly do

huntermarchi avatar Jan 11 '25 20:01 huntermarchi

so can i work independently?

NalinDalal avatar Jan 16 '25 05:01 NalinDalal

Can you show what you are facing as because It works fine for me everywhere. Also you sample code gives "ReadableStream Error". Did you mean to use "testfile.txt" instead of "testfile.js"

rishabhtyagi2311 avatar Feb 19 '25 11:02 rishabhtyagi2311

@SomeStein I changed the testfile.js as you said, but here it works fine ig.

Image After this I changed testfile.js and it worked.

Image Is this what you were facing issue? or something else?

swastikCommits avatar Mar 02 '25 06:03 swastikCommits