My package isn't reloading properly with Window: Reload


#1

I’ve created a custom package for my team and I am using the atom-space-pen-views node module to display help documentation in formatted markdown text. It was working great up until I tried to fix a bug today and now any new code that I type in my javascript file will not be used when Window: Reload.

The function that is called when the hexe:help-selection command is called isn’t using the console.log that I’ve put there. It just gets ignored…

Here is my code:

helpSelection(event) {
console.log("test");
var s = this.expandedSelection(s => s.match(/^[a-zA-Z._0-9]*$/));
if (s === "")
  return;
else if (Help.has(s))
  atom.workspace.open(`hexe-help://help/${s}`, {split: "right"});
else
  atom.notifications.addError(`\`${s}\` not found in Lua API.`);
}

The first line in the function console.log("test"); was added just today and when I look at the console, I never see that text being logged there. I’m really stumped as to what’s going on cause any new changes that I make to any part of the file doesn’t get recognized when the window is reloaded.


#2

Have you tried closing all instances of Atom and reopening it?


#3

Yes, still did the same thing.

Just restarted my computer and that didn’t solve anything either. I’ve added a couple more console.log's through the code base and none of them end up showing up either.


#5

I think that I’ve fixed it, or at least that my console.log messages started appearing again.

What I did was I found this post talking about how to load dev packages. And I never knew that there even was the apm develop command. So tried doing what the post suggests and it works now.

The weird thing is that I never used to do this and my package development was going smoothly. So I don’t know what’s changed since the last update to atom. Maybe they’re enforcing this now?