[PSS 2021][Bug] Synchronized Projects and the bin folder

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

[PSS 2021][Bug] Synchronized Projects and the bin folder

Post by Bosparan »

PSS Version: 2021 5.8.183x64
OS Version: Windows 10 x64 1903
WMF Version: 5.1

Impact: Medium

Symptoms:
When setting a module project to "Synchronized = True" in the project settings, it will not show the bin folder and any pf its contents.
The output window shows it detecting the files & folders and intentionally removing them.
This remains true even when setting the filter to "*" or "*.*".

Reproducibility:
- Create new module project
- Create bin folder in module root
- Set Synchronized to true
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by brittneyr »

This is expected and intentional for a bin folder.
In a module project, a bin folder is created when building a module project for an msi. This folder is not intended for use outside of this and it is naturally filtered out in when the project is synchronized.
Brittney
SAPIEN Technologies, Inc.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by Bosparan »

Hi Brittney,

Granted it's not a bug but by design then :)
This puts me a bit on a spot then though:
I have literally hundreds of project with that folder, often enough using it for PowerShell goodness (as the name is perfectly legitimate to use within a PowerShell project).
Things I frequently put there:
- PowerShell Classes (good by intellisense)
- Type Extension code
- Type Aliases
- DLL files or other binaries (granted, don't really need those in the editor, but still nice to see the full project and all its content)

Soooo ... could we change this into a feature request then?
A new project option (or editor option) that restores the bin folder at the cost of not being able to build as MSI (which honestly I'd never need to in my workflows).

Cheers,
Bosparan
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by brittneyr »

The folder name 'bin' is used as an output folder for binary files industry wide. Changing it, even as an option, would create inconsistencies amongst a larger number of our users. Therefore we are sorry to say that it is probably easier for you, as a single user, to change the folder name you use for your own purposes.
Brittney
SAPIEN Technologies, Inc.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by Bosparan »

Can't say I can agree here.
I don't think it would create an inconsistency. It might cause a few people being slightly confused, but the majority of PowerShell users are not actually programmers that would solidly expect that. I would expect that the majority of users that even noticed would shrug and ignore it.
As for changing it - I do not have access over much of the code as I wrote it for customers, whom so far I have recommended using PowerShell Studio.
Also my templating system that I publicly share under an MIT license (https://www.powershellgallery.com/packa ... velopment/) will create new module projects with just that folder (whether community members use it or not I cannot say, but in many cases I cannot reach them anyway).

On a more philosophical perspective, you just decided to constrict the way the user may structure the code. I believe a code editor's role is supporting a user in their coding, not restrict them in their coding choices.

You just did a breaking change on user projects and frankly: I see no reason/benefit why you did so (your build process worked before).
Even adding a detection whether a user used that folder and having a backup folder for you own use in case would have been possible (and avoid needing an option, making the developer expectations on that a moot point anyway).
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by Alexander Riedel »

Let me jump in here: "On a more philosophical perspective, you just decided to constrict the way the user may structure the code. I believe a code editor's role is supporting a user in their coding, not restrict them in their coding choices."
Yes on both accounts. Some reserved names happen. Visual Studio uses 'Release' and 'Debug', 'x64' and a few others. Windows would not allow you to repurpose a folder named "Program Files" or whatever your localized equivalent is. We have one folder with a reserved name that gets filtered out and it tells you about it. So far it seems you are the only person to have run into an issue with it. I do not mean to diminish your opinion, input or problem, but I hope you understand that we just simply cannot drop what we are doing and change folder names on the say-so of one person.

"I would expect that the majority of users that even noticed would shrug and ignore it." That is a huge assumption. Say only ONE user will have an issue with that. Why should we decide that your opinion is more valuable that this other user's? Again, I am not attempting to diminish your input or problem, but you see where this is going I hope.

This filter for the 'bin' folder has been in place for years, it is not a sudden breaking change. It is also not only used for MSI files. Changing it now would in fact be a breaking change.
We are always open to hear suggestions and apply improvements, but we cannot custom code for every single user, specially if it affects things that have been in place for a long time.
Alexander Riedel
SAPIEN Technologies, Inc.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by Bosparan »

Hi Alexander,

thanks for jumping in here, hope you had a great start into the new year, politics not-withstanding :)
Say only ONE user will have an issue with that. Why should we decide that your opinion is more valuable that this other user's?
Very excellent point. Was too stuck in my frustration there.
This filter for the 'bin' folder has been in place for years
That one confuses me: I've been happily seeing my bin folder in 5.7.179 day before yesterday.
but I hope you understand that we just simply cannot drop what we are doing and change folder names on the say-so of one person.
Absolutely. I never expected a "oh sure, will be done next week" in my own best case scenario. And that was on the assumption that it was a recent change, while instead it might have been a weird "bug" (in my favor) on my end.

One thing though:
If this really is here to stay, could you add a warning explaining why you remove them?
Without that info it's confusing as hell when things keep disappearing ...
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by Alexander Riedel »

I will have to investigate that. As far as I can tell this last build involved absolutely no changes that would affect that.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by brittneyr »

After further investigation of the issue you described, it was determined that this behavior was changed in build 5.7.180 after updating the MSI build process for module projects. I understand the confusion as there is very little warning to the folder not being present in the Project panel and I've spoken with the development team about making these synchronization changes more obvious. This behavior is not inherently new to PowerShell Studio as other project types filter the 'bin' folder out by default. As for changing this behavior, that is unlikely as 'bin' is a commonly reserved folder name in other SAPIEN products and tools. If I receive any other information regarding this, I'll post here.
Brittney
SAPIEN Technologies, Inc.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

Re: [PSS 2021][Bug] Synchronized Projects and the bin folder

Post by Bosparan »

Heya Brittney,

thanks for the update!
Yeah, since the few UI projects I did in the last years were all-script I wouldn't have noticed that before.
Still can't say I'm happy with it, but I definitely see the other side of the argument better now :)
Thank you for putting up with me at one of my crankier moments this week.

Also thank you for any potential updates on this.
Honestly, I don't really expect this to be reverted however (though it'd definitely make me happy if there were a way to go back on that).

Cheers,
Bosparan

PS: Apologies, but one last comment the tech nerd in me needs to write (Mostly so it won't haunt me for the next few days that I should have, not because of any expectations):
A non-ui option to reenable the old mode would totally work for me (e.g. registry key, config file, etc.). Would keep the cost down.
This topic is 2 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.