Git Product home page Git Product logo

corrosion's People

Contributors

akurtakov avatar boereck avatar dependabot[bot] avatar devnullexile avatar howlger avatar mbooth101 avatar mickaelistria avatar norru avatar rootkea avatar sebthom avatar tweksteen avatar vrubezhny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corrosion's Issues

Pasting code kills IDE

I'm trying to reproduce #57.
From a new Eclipse for Rust developers package, with a new workspace, I create a new Rust project. So far, so good. Then, at the end of the newly opened file, I paste the following code let mut x: Vec = Vec::new();. I see the code isn't pasted, IDE freeze then crashes.

Syntax highlighting issue

Syntax highlighting of a valid Rust code is incorrectly done. Here is a sample:

fn main() {
    println!("Hello, world!");
}

lazy_static!{
pub static ref bar : Vec<&'static str> =
    vec!["a", "b", "c", "d", "e"];

pub static ref t: i32 = 0;
}

fn foo() {
}

Here is the incorrect syntax highlighting performed by redOx:
screenshot_20180105_155115

Here is the correct syntax highlighting performed by RustDT:
screenshot_20180105_155104

Prevent completion assist in comments

This is a suggestion. The completion assist is shown even inside of the comment sections.

Reproduce steps:

  1. Add a comment (// or /**/. it doesn't matter)
  2. Write some description, type in a dot (.) and try to continue with your documentation

Expected result:

  • There shouldn't be any suggestions

Actual result:

  • There are suggestions to autocomplete the "code".

Continuous Build and download area

To be sustainable and welcoming of new contributors, Corrosion should set up a CI system and also make the snapshots of latest build constantly available for testing.
I suggest Corrosion can mimic how aCute is setup: https://ci.eclipse.org/acute/ It uses the Jenkins pipeline plugin and Jenkinsfile and so far, it works great.

Error when using RedOx together with JDT and Enhanced Class Decompiler

Eclipse version: Oxygen.2 (4.7.2)
RedOx version: 0.1.0.201801181621
Enhanced Class Decompiler version: 3.0.0.201709092115

Every time I open a decompiled (Java) ".class" file using the "Enhanced Class Decompiler" the following popup shows up:

An error has occurred. See error log for more details.
org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput cannot be cast to org.eclipse.ui.part.FileEditorInput

Strangely enough, this error occurs when neither the Rust-perspective is selected, nor any RedOx-specific view is open and can easily be reproduced. It disappears after uninstalling RedOx.

Use EPLv2

As this is a new project, it'd be better to initiate it under EPLv2 and to update headers before it becomes too tedious.

Create New Cargo Project Wizard

Wizard interface for the cargo new/init command.

Support for the tags:
--vcs VCS - Setting up the project with a certain version control system (git, hg, pijul, fossil)
--bin/--lib - Using a binary or library template
--name NAME - Setting the name of the project

Ensure spaces are being used instead of tabs in formatting

lsp4e uses the system defaults for formatting parameters, this includes the tabs/spaces option. However, Rust formatting guide says that spaces should be used instead of tabs. In VS Code, no matter the workspace settings formatting is done with spaces.

Options for fixing:

  1. In the preferences point users to the Text Editor preferences saying this is where you can update the defaults
  2. Find a way to override the lsp4e formatting to ensure the spaces parameter is sent (don't know if this is possible)
  3. Fix this upstream in RLS ensuring that it ignores the parameter and always returns spaces

installation error

Hi!
Thank you for cool project! I can't wait to play with it!

I got following error message then try to install the plugin. I tried to install it in Eclipse Neon3 CDT using p2 repository:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Corrosion: Rust edition in Eclipse IDE 0.1.0.201802061310 (org.eclipse.corrosion.feature.feature.group 0.1.0.201802061310)
  Missing requirement: Rust edition in Eclipse IDE 0.1.0.201802061310 (org.eclipse.corrosion 0.1.0.201802061310) requires 'bundle org.eclipse.ui.genericeditor 1.0.1' but it could not be found
  Cannot satisfy dependency:
    From: Corrosion: Rust edition in Eclipse IDE 0.1.0.201802061310 (org.eclipse.corrosion.feature.feature.group 0.1.0.201802061310)
    To: org.eclipse.corrosion [0.1.0.201802061310]

Eclipse Oxigen 2 CDT:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Corrosion: Rust edition in Eclipse IDE 0.1.0.201802061310 (org.eclipse.corrosion.feature.feature.group 0.1.0.201802061310)
  Missing requirement: Language Server Protocol client for Eclipse IDE (Incubation) 0.6.0.201801160955 (org.eclipse.lsp4e 0.6.0.201801160955) requires 'bundle org.eclipse.jface.text 3.13.0' but it could not be found
  Cannot satisfy dependency:
    From: Corrosion: Rust edition in Eclipse IDE 0.1.0.201802061310 (org.eclipse.corrosion.feature.feature.group 0.1.0.201802061310)
    To: org.eclipse.lsp4e [0.6.0.201801160955]

No mater via Marketplace or using p2 repository - the result is same.

Incorrect update site for Eclipse Oxygen 4.7

The link https://github.com/LucasBullen/redox.github.io does not work. Eclipse says this is not a valid update site.
The link that works is this: https://raw.githubusercontent.com/LucasBullen/redox.github.io/master/.

Log RLS communications

To help debug issues, having the communications between the language server and the client recorded and easily accessible would greatly assist in diagnostics and reporting of issues.

Adding eclipse .dotfiles to gitignore

When running
mvn clean verify
for the first time after importing it in eclipse, you get the error

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:build-qualifier (default-build-qualifier) on project org.eclipse.corrosion: Working tree is dirty.
[ERROR] git status org.eclipse.corrosion:
[ERROR]
[ERROR] Changes not staged for commit:
[ERROR] modified: org.eclipse.corrosion/.gitignore
[ERROR]
[ERROR] Untracked files:
[ERROR] org.eclipse.corrosion/.settings/org.eclipse.m2e.core.prefs
[ERROR]
[ERROR] You are trying to use tycho-buildtimestamp-jgit on a directory that has uncommitted changes (see details above).
[ERROR] Either commit all changes/add files to .gitignore, or enable fallback to default timestamp provider by configuring
[ERROR] jgit.dirtyWorkingTree=warning for tycho-packaging-plugin
[ERROR] -> [Help 1]

because of the generated dotfiles for eclipse.
Adding those files to .gitignore would help for this. Also this files are generated when importing the project as maven project.

Import Rust project

Now i can only open an rust project over the

Open Projects from Filesystem ...

But i can not import an rust project like other projects in eclipse as example maven,gradle etc.
It would help, if there were an import option for rust projects into the workspace.

Test suite for preferences

A test suite to confirm the functionality of getting/setting the default toolchain and UI of the preferences page

Generate a local update site or archive

To ease testing of Corrosion without having to run multiple Eclipse instances, is there a way to generate a local update site or an archive that can be provided to Eclipse in order to install a locally built version of Corrosion?

Add RLS Specific Extensions to the LSP

RLS to LSP Client

These are all sent from the RLS to an LSP client and are only used to improve
the user experience by showing progress indicators.

  • rustDocument/beginBuild: notification, no arguments. Sent before a
    build starts.
  • rustDocument/diagnosticsBegin: notification, no arguments. Sent before
    indexing or any diagnostics from a build are sent (build is likely in progress).
  • rustDocument/diagnosticsEnd: notification, no arguments. Sent when a build
    is complete (successfully or not, or even skipped) and all post-build analysis
    by the RLS is complete.

LSP Client to RLS

The following request is to support Rust specific features.

  • rustDocument/implementations: request
    params: [TextDocumentPositionParams]
    result: [Location] []

    List all implementation blocks for a trait, struct, or enum denoted by the
    given text document position.

https://github.com/rust-lang-nursery/rls/blob/master/contributing.md#extensions-to-the-language-server-protocol

No autocomplete for macro

Open any rust file. Try to autocomplete any macro like println or write just to find they are not in the list at all.

Installation error: "No such member: attributes"

When attempting to install the plugin in Eclipse Oxygen 2, I get the following exception:

java.lang.IllegalArgumentException: No such member: attributes
	at org.eclipse.equinox.internal.p2.metadata.ProvidedCapability.getMember(ProvidedCapability.java:85)
	at org.eclipse.equinox.internal.p2.metadata.expression.Member$DynamicMember.invoke(Member.java:47)
	at org.eclipse.equinox.internal.p2.metadata.expression.Member$DynamicMember.evaluate(Member.java:42)
	at org.eclipse.equinox.internal.p2.metadata.expression.Matches.evaluate(Matches.java:36)
	at org.eclipse.equinox.internal.p2.metadata.expression.And.evaluate(And.java:26)
	at org.eclipse.equinox.internal.p2.metadata.expression.Unary.evaluate(Unary.java:42)
	at org.eclipse.equinox.internal.p2.metadata.expression.Exists.evaluate(Exists.java:29)
	at org.eclipse.equinox.internal.p2.metadata.expression.CollectionFilter.evaluate(CollectionFilter.java:58)
	at org.eclipse.equinox.internal.p2.metadata.expression.MatchExpression.evaluate(MatchExpression.java:44)
	at org.eclipse.equinox.p2.query.ExpressionMatchQuery.isMatch(ExpressionMatchQuery.java:86)
	at org.eclipse.equinox.p2.query.ExpressionMatchQuery.perform(ExpressionMatchQuery.java:73)
	at org.eclipse.equinox.p2.query.ExpressionMatchQuery.perform(ExpressionMatchQuery.java:63)
	at org.eclipse.equinox.internal.p2.metadata.index.IndexProvider.query(IndexProvider.java:23)
	at org.eclipse.equinox.internal.p2.metadata.index.IndexProvider.query(IndexProvider.java:32)
	at org.eclipse.equinox.internal.p2.director.Slicer.expandRequirement(Slicer.java:183)
	at org.eclipse.equinox.internal.p2.director.Slicer.processIU(Slicer.java:146)
	at org.eclipse.equinox.internal.p2.director.Slicer.slice(Slicer.java:65)
	at org.eclipse.equinox.internal.p2.director.SimplePlanner.getSolutionFor(SimplePlanner.java:331)
	at org.eclipse.equinox.internal.p2.director.SimplePlanner.getProvisioningPlan(SimplePlanner.java:387)
	at org.eclipse.equinox.internal.p2.operations.PlannerResolutionJob.runModal(PlannerResolutionJob.java:76)
	at org.eclipse.equinox.p2.operations.ProfileChangeOperation.resolveModal(ProfileChangeOperation.java:115)
	at org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard$2.run(ProvisioningOperationWizard.java:295)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

with session data:

eclipse.buildId=4.7.2.M20171130-0510
java.version=1.8.0_144
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.cpp.product
Command-line arguments:  -data file:<home_dir>/eclipse-workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product

This might be related to Bug 528387.

By the way, installing Eclipse Photon 4.8 (still in beta stage as of now) solves the issue. Still, can you please provide a workaround for people using the stable version of Eclipse?

Content Assist stops working

Today I installed corrosion plugin via the eclipse market place.

When I first open up eclipse with a trivial rust project, content assist appears to work..
ie I have the following ..

let mut x: Vec = Vec::new();

then
x. gives me a list of vector functions.. ( tho' not all of them .. I never see iter() for example)

then when I use this feature a couple of times the list goes away

.. restart eclipse and it seems to work again.

Is there a way for me to debug this?

My environment

Eclipse corrosion plugin: Corrosion: Rust edition in Eclipse IDE 0.1.0.201804131828 org.eclipse.corrosion.feature.feature.group Red Hat Inc.
Platform : ubuntu 14.4
eclipse oxygen Apr-2018
rustc --version
rustc 1.25.0 (84203cac6 2018-03-25)

rust language server appears to be running ..
ps -ef | grep rls
david 22008 21937 0 21:52 ? 00:00:03 /home/david/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rls

Project name confusing with the Redox OS project

While the Redox name is nice for a project in Rust, it is already used by another great project in Rust : the Redox OS project. Since the Redox project is currently pretty active, another unrelated project with a really similar name is really confusing.

The project is still young, having a name change now would not be too harmful.

Direct Link to dependencies

When selecting an dependencie in the .toml file it could redirect the user to the crates.io site of it. Kinda like intellij is doing it. This would open the browser with the following url https://crates.io/crates/dependency_name/version .
Dont know what the best approach would be. An icon on the left side of the editor or with an submenu in rightklick.

Error while starting debugger

This error appears in the workspace logs when I try to debug a simple main function:

!ENTRY org.eclipse.core.jobs 4 2 2018-05-15 01:14:08.044
!MESSAGE An internal error occurred during: "Launching New_configuration".
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
	at org.eclipse.core.runtime.Path.initialize(Path.java:641)
	at org.eclipse.core.runtime.Path.<init>(Path.java:238)
	at org.eclipse.core.runtime.Path.<init>(Path.java:186)
	at org.eclipse.core.runtime.Path.fromOSString(Path.java:92)
	at org.eclipse.corrosion.RustGDBLaunchWrapper.getGDBLocation(RustGDBLaunchWrapper.java:75)
	at org.eclipse.corrosion.RustGDBLaunchWrapper.getLaunchEnvironment(RustGDBLaunchWrapper.java:56)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunch.getGDBVersion(GdbLaunch.java:524)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:142)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
	at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
	at org.eclipse.corrosion.debug.RustDebugDelegate.launch(RustDebugDelegate.java:95)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

Steps to reproduce:
Create a new cargo project from the eclipse UI
Set a breakpoing in the only available line println!("Hello, world!");
Create a new debug configuration for target "run".
It gives that error as result

Test Support

Add a run configuration for testing rust projects.

Can't launch rust project

Trying to launch rust project ends up in "Unable to find project". Reverting to two days old commit makes it work again.

Snippet Preferences

With 0c68cee, snippets have been added to completion assist. Users should be able to turn on/off snippet completion and add their own within a Rust preferences sub menu.

Travis CI Support

To ensure passing of test suite with each PR, Travis CI should be integrated into this repo

Project not showing up when created outside of workspace

The project contents are not shown. You only see the project name/folder, and you can't expand it right after you create it. I also tried creating the project manually. It still doesn't work.
I had to manually switch to the Rust perspective, but the project explorer still shows an empty project.

I tried a brand new installation getting an Eclipse package, and through the Eclipse installer too. Both times I went to the marketplace, installed Corrosion, restarted Eclipse, and created a new project. The bug is still present.

Config:
LUbuntu 18.04LTS x64
OpenJDK 10.0.1 2018-04-17

Do not include dependencies in feature.xml

When built, the feature.xml files locks to a specific version of each dependency. In most cases, this is not desired as it can make updates of other extensions failing. For example, the dependency on mylyn.wilkitext on the feature here could prevent from updating mylyn because Corrosion locks it to a specific version on the feature.
The rule is generally to "include only what you build" in the feature.
Other dependencies can be added as extra to the p2 repo so they can be resolved at best during installation. See for example how aCute does that:

This will quickly become a blocker for people who want to try Corrosion, or even if we want to make progress with integration in SimRel and packaging as an EPP product.

Edits not reflected in debug mode

With the code:

fn main() {
	let mut a = "first";
	println!("Hello, world!");
	println!("The value of x is: {}", a);
}
  • Put a breakpoint on the println!("Hello, world!"); line
  • Debug the program
  • Change the value of a to second
  • Continue running the program

Expected

Prints The value of x is: second

Actual

Prints The value of x is: first

Implement Outline view

Hi
I think that this particular feature is brilliantly done in Eclipse, and I would love to see it realized in Corrosion for Rust in particular.
Here's a screenshot of the outline view displayed by Eclipse for a Java file:

Cursor blinking too much on editor

When editing .rs file in Generic Editor and LS working, the cursor is blinking a lot (too much). This is probably a bad smell that some processing is happening for no reason.

Issue with rustup installation

If a toolchain is missing (e.g. beta) and one clicks Apply and right after that(fast enough so download hasn't completed) Apply and Close button there is error printed. Depending on what was already downloaded one can get error messages like toolchain can not be installed, toolchain doesn't contain RLS and probably others.
A check whether installation of the given toolchain is ongoing should be done and second installation of the same toolchain should not be started.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.