Argon - VS Code sync [Plugin]

Is there a cli for this. Like how rojo has an executable you can install with foreman so you can do stuff in the terminal like rojo serve

Not yet.
Someone already suggested it before but it’s low priority as more people use VSC UI rather than terminal.

So I will start working on this feature after I release two-way sync, support for properties and some other more important features.

Not sure if you can fix this issue but sometimes it errors saying

cannot resume dead coroutine

when stopped. So… maybe try if statements to fix it or…?

I’m aware of this issue but problem is that it’s extremally random and when I want to fix it I can’t reproduce it at all. It’s already inside if statement look:

image

So I guess I’m gonna fix that in a little bit sketchy way, I will just put if statement inside pcall.

Using a pcall there might have an effect on the performance, however it look like it’s the best you can do to fix this issue. Though, the error does not have any effect on the actual plugin other than logging out the error.

Argon 0.3.2 & 0.3.3

Changes:

0.3.3

  • Added icon for .argon.json
  • Added support for custom directories (inside .argon.json)
  • Fixed issue with root folder caused by 0.3.2 update
  • Fixed “cannot resume dead coroutine” error

0.3.2

  • Added auto check for updates in both Roblox plugin and VSC extension
  • Added option to not create root (src by default) folder automatically (VSC)
  • Fixed some bugs which were caused by the lack of an open workspace (VSC)
  • Updating Argon settings no longer requires window reload (VSC)
  • Added more VSC icons

Custom directories

Added custom directories which may be useful for people developing e.g. plugins. Here is how to use them:

Auto create folder

Now you can disable automatic root folder creation:

New settings system

As you can see on previous video changing setting no longer requires you to restart VSC or reload the window.

Auto check for updates

Now you will be notified when the new version is released:
image

Future updates

Now I will start working on update 0.4.0 which will add two-way sync. Support for properties will be added in update 0.5.0.

1 Like

Man, I don’t think I can keep up with the updates you’re posting :sweat_smile:. It’s insane that you’re posting updates literally like every 3-4 days for a plugin. Incredible job as always!

1 Like

First off, I want to say that all the nay-sayers here can go kick rocks and kiss Rojo all they want. Nothing aginst Rojo but for me personally, Argon is a MASSIVE improvement in simplicity and ease of use for me.

I’ve noticed that if I have a script that has children, ie a model used for a game, and then I publish from VSCode → Roblox (after syncing to Vscode), it overwrites and screws up the children of that script.

I think a good fix for this would be a setting that would make it so that when you sync from vscode → Roblox, it copies the non-script children of a script, and then pastes them into the new script so it’s identical to before, but with any changes made.

Ie, if I have

image

And for some reason, need to manually force a sync from VsCode → Roblox, the model goes from looking like this

To looking like this

Wonder if this is what’s causing what I posted above?

There are two reasons why this is happening. First of all properties are not synced (this feature will be added in future updates) so all instances are created with its default values. Secondly if you have multiple parts with the same only one will be saved locally as it’s Windows’ limitation and there is nothing I can do about it.

If you update script, children should not overwrite, if this is happening I will have to fix that.

I’m half asleep rn so I will take a look at your post once again when I wake up.

Anyway thanks for the feedback!

EDIT: I can see that many people want to use Argon as source control tool so MAYBE after I release all of the most important features I will create separate plugin focused on source control which will be integrated with Argon.

1 Like

Tbh the only reason I port to Roblox is because sometimes I leave Argon off by mistake and don’t want to have to go back and ctrl + s in all of the scripts I changed, and recreate what I did in argon back in roblox.

I think a great solution would just be a separate sync button that only syncs code & folder changes/ignores other instances.

And again, thank you for your work with Argon.

Perhaps, turn on the “Only Code Mode” in the settings?

It is. If there is an object parented to a script and I have that on, it just deletes it. Also, when I sync to vscode in the latest version I get this error
image

That’s probably a bug, and this plugin isn’t perfectly released. Maybe try playing around with the features?

Checked the plugin code, and this is a problem with the StarterPlayer scripts checking. The error is from a function named len where he gets the length of the array.

local function len(array)
    local index = 0

    for _, _ in pairs(array) do -- Errors in this line, since there's no `if` statement checking if the array is nil or not
        index += 1
    end

    return index
end

Sorry to change the topic, but @Dervex, #array would’ve worked, right?

        if len(instancesToSync['StarterPlayer']['StarterCharacterScripts.StarterCharacterScripts']) == 0 then
            instancesToSync['StarterPlayer']['StarterCharacterScripts.StarterCharacterScripts'] = nil
        end

        if len(instancesToSync['StarterPlayer']['StarterPlayerScripts.StarterPlayerScripts']) == 0 then
            instancesToSync['StarterPlayer']['StarterPlayerScripts.StarterPlayerScripts'] = nil
        end

        if len(instancesToSync['StarterPlayer']) == 0 then
            instancesToSync['StarterPlayer'] = nil
        end

You could’ve just used

if (#instancesToSync['StarterPlayer']['StarterPlayerScripts']) == 0 then
    instances['StarterPlayer']['StarterPlayerScripts'] = nil -- And that's the same result right? Please correct me if I'm wrong.
end
1 Like

Depends on if it’s an array or a table. If it’s

{ a,b,c,d } then #tbl works, but if its { "a" = 1, "b" = 2, "c" = 3} etc then you gotta count it IIRC.

Is there a github repo for the plugin? I was looking at it earlier and ended up just copying the rbxm from my own installation.

Repo

Oof must have missed the plugin folder. Thanks!

1 Like

Hmm, now it makes sense because the indexes are string type. Thanks for the explanation. [For Dervex after this,] But, I’d recommend adding ifs OR you might use promises. It depends on how you want to implement the code into the plugin though.