Git Product home page Git Product logo

addressbook-level1's Introduction

SE-EDU

SE-EDU (se-education.org) is a collection of FOSS resources for Software Engineering (SE) educators and students. The full website is available at https://se-education.org

addressbook-level1's People

Contributors

alexlmeow avatar brandonyeoxg avatar chao1995 avatar creastery avatar damithc avatar eugenepeh avatar j-lum avatar limmlingg avatar m133225 avatar ndt93 avatar okkhoy avatar pyokagan avatar rongjiecomputer avatar thenaesh avatar weikangchia avatar yamgent avatar yamidark avatar zhangyijiang avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

addressbook-level1's Issues

runtests.bat: File access errors when case sensitive attribute is enabled on directories

Subject of the Issue

runtests.bat reports file access errors when the case sensitive attribute of \src or \test directories is enabled.

There are two related sub-problems discovered:

  1. Typographical error in runtests.bat:10 resulting in javac reporting a "file not found" error.
    javac ..\src\seedu\addressbook\Addressbook.java -d ..\bin should have been:
    javac ..\src\seedu\addressbook\AddressBook.java -d ..\bin
  2. fc file compare utility tool shipped with Windows (used in runtests.bat:35 - FC actual.txt expected.txt) is unable to access files residing in directories with case sensitive attribute enabled

This unintentional bug was likely introduced with the release of Windows 10 Redstone 4 Insider Build 17093, as the case sensitive attribute for directories was first introduced in this particular Windows 10 Insider Build (eventually released in Windows 10 Redstone 4 officially as well).

Tested on Environment(s)

  • Fully updated Windows 10 Version 1803 (April 2018 Update) a.k.a. Windows 10 Redstone 4
  • Fully updated Windows 10 Version 1809 (October 2018 Update) a.k.a. Windows 10 Redstone 5
  • WSL installed and enabled (required to reproduce this bug)
  • Oracle JDK 9.0.4

Sub-problem 1: javac reporting a "file not found" error

Steps to Reproduce

  1. Ensure that WSL optional feature is installed and enabled by running the following command in PowerShell as Administrator:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  1. Restart the computer when prompted
  2. Ensure that case sensitive attribute is enabled in \src directory:
C:\[REDACTED]\addressbook-level1>fsutil file setCaseSensitiveInfo .\src enable
Case sensitive attribute on directory C:\[REDACTED]\addressbook-level1\src is enabled.
  1. Execute runtests.bat

Expected Behaviour

No errors when running runtests.bat.

In \test directory:

C:\[REDACTED]\addressbook-level1\test>runtests.bat
        1 file(s) copied.

C:\[REDACTED]\addressbook-level1\test>echo %ERRORLEVEL%
0

Outside \test directory:

C:\[REDACTED]\addressbook-level1>test\runtests.bat
        1 file(s) copied.

C:\[REDACTED]\addressbook-level1>echo %ERRORLEVEL%
0

Actual Behaviour

When running runtests.bat, javac reports a "file not found" error.

In \test directory:

C:\[REDACTED]\addressbook-level1\test>runtests.bat
javac: file not found: ..\src\seedu\addressbook\Addressbook.java
Usage: javac <options> <source files>
use --help for a list of possible options
********** BUILD FAILURE **********

C:\[REDACTED]\addressbook-level1\test>echo %ERRORLEVEL%
1

Outside \test directory:

C:\[REDACTED]\addressbook-level1>test\runtests.bat
javac: file not found: ..\src\seedu\addressbook\Addressbook.java
Usage: javac <options> <source files>
use --help for a list of possible options
********** BUILD FAILURE **********

C:\[REDACTED]\addressbook-level1>echo %ERRORLEVEL%
1

Suggested Fix:

Simply replace javac ..\src\seedu\addressbook\Addressbook.java -d ..\bin found at runtests.bat:10 with javac ..\src\seedu\addressbook\AddressBook.java -d ..\bin.

Sub-problem 2: fc reporting a "no such file or folder" error

Steps to Reproduce

  1. Ensure that WSL optional feature is installed and enabled by running the following command in PowerShell as Administrator:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  1. Restart the computer when prompted
  2. Ensure that case sensitive attribute is enabled in \test directory:
C:\[REDACTED]\addressbook-level1>fsutil file setCaseSensitiveInfo .\test enable
Case sensitive attribute on directory C:\[REDACTED]\addressbook-level1\test is enabled.
  1. Fix the typographical error in runtests.bat:10 by replacing the affected line with:
    javac ..\src\seedu\addressbook\AddressBook.java -d ..\bin
  2. Execute runtests.bat

Expected Behaviour

No errors when running runtests.bat.

In \test directory:

C:\[REDACTED]\addressbook-level1\test>runtests.bat
        1 file(s) copied.

C:\[REDACTED]\addressbook-level1\test>echo %ERRORLEVEL%
0

Outside \test directory:

C:\[REDACTED]\addressbook-level1>test\runtests.bat
        1 file(s) copied.

C:\[REDACTED]\addressbook-level1>echo %ERRORLEVEL%
0

Actual Behaviour

When running runtests.bat, fc reports a "no such file or folder" error.

In \test directory:

C:\[REDACTED]\addressbook-level1\test>runtests.bat
        1 file(s) copied.
FC: cannot open ACTUAL.TXT - No such file or folder

C:\[REDACTED]\addressbook-level1>echo %ERRORLEVEL%
2

Outside \test directory:

C:\[REDACTED]\addressbook-level1>test\runtests.bat
        1 file(s) copied.
FC: cannot open ACTUAL.TXT - No such file or folder

C:\[REDACTED]\addressbook-level1>echo %ERRORLEVEL%
2

Suggested Fix:

Due to the way how the fc file compare Windows utility tool parses and transforms filepaths internally, one possible fix for this problem is to disable the case sensitivity attribute of \test directory, unless Microsoft fixes the way how the fc tool parses and interprets filepaths.

Delete Eclipse project files

As we have moved to IntelliJ, the Eclipse project files are no longer needed.

Let's remove these files/folders:

  • .classpath
  • .project
  • .settings/*
  • docs/*.pptx

Add default addressbook.txt

The first test run always fail - encountered difference between actual.txt and expected.txt. This happened due to the default storage file was not provided, hence the program has to generate a new one on its first run.

image

Let's include a default file, addressbook.txt, in the test folder so that the runtests.bat does not fail on the first run.

How do we test and push?

I don't understand how to test with the text files? I implicated the to do's and tried to push but it didn't work. I'm not sure what I'm doing wrong. The error says

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin master:master
remote: Permission to nus-cs2103-AY1819S2/addressbook-level1.git denied to PhilipPhil.
fatal: unable to access 'https://github.com/nus-cs2103-AY1819S2/addressbook-level1.git/': The requested URL returned error: 403

Pushing to https://github.com/nus-cs2103-AY1819S2/addressbook-level1.git
Completed with errors, see above.

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.