-
Notifications
You must be signed in to change notification settings - Fork 70
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
Error out early if building on OneDrive #677
Comments
Hey @PeterJohnson I can try and implement this, I am currently thinking to take the full directory of the project and check if OneDrive is a string within it. Does this seem good or is there a different implementation that you had in mind? |
That's pretty much exactly what I was thinking. It's unlikely that will hit false positives (e.g. someone names their user or project "OneDrive" feels unlikely). |
Hey @PeterJohnson I thought something like that was unlikely as well but we might want to add a note somewhere in the documentation about not creating projects in OneDrive. Not 100% sure where we would put that but I'm more than happy to add a note to the docs if you tell me where to |
That’s why there’s also a companion issue to this one on vscode-wpilib. If we do the same detection there it can warn when opening or prevent creation of a project, which should cover most users. |
@PeterJohnson that sounds good I hadnt seen that, I would guess most people not creating their project using the vscode creator would be keeping track of issues here |
This provides an even earlier detection point compared to gradlerio. wpilibsuite/GradleRIO#677 It should still be done in GradleRIO to catch things like moved and cloned projects
* search project initialised directory for onedrive in execute function * apply changes from review * fix error being supressed * use runtime exception in onedrive error * add print in error and make check case insensitive * use Paths.get instead of user.dir * move check to apply method and use gradle method instead of java method * remove unnecessary imports from previous commit * remove another unnecessary import * fix printed directory * catch and print error instead of throwing it * try catch check only throw if try catch succeeds * fix items from review
OneDrive breaks caching (and almost certainly other things too, like native extraction), so we should check early if the project is on OneDrive and error out if it is.
The text was updated successfully, but these errors were encountered: